17344: Fix temp config file.
[arvados.git] / lib / boot / supervisor.go
index ebe1eb6f68434bae2cf9167d8ee20f0ca548533d..ca88653fa643e56a93cdb8eb2136cacbf403044f 100644 (file)
@@ -282,7 +282,7 @@ func (super *Supervisor) runCluster() error {
        if err != nil {
                return err
        }
-       conffile, err := os.OpenFile(filepath.Join(super.wwwtempdir, "config.yml"), os.O_CREATE|os.O_WRONLY, 0644)
+       conffile, err := os.OpenFile(filepath.Join(super.wwwtempdir, "config.yml"), os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0644)
        if err != nil {
                return err
        }