Commit 8a1d43ec authored by Anton Galitsyn's avatar Anton Galitsyn

check the error that WriteFile returns

parent e3f39f30
...@@ -190,7 +190,9 @@ func ensureDefaultRepos(home helmpath.Home, out io.Writer) error { ...@@ -190,7 +190,9 @@ func ensureDefaultRepos(home helmpath.Home, out io.Writer) error {
} }
f.Add(sr) f.Add(sr)
f.Add(lr) f.Add(lr)
f.WriteFile(repoFile, 0644) if err := f.WriteFile(repoFile, 0644); err != nil {
return err
}
} else if fi.IsDir() { } else if fi.IsDir() {
return fmt.Errorf("%s must be a file, not a directory", repoFile) return fmt.Errorf("%s must be a file, not a directory", repoFile)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment