Skip to content

Commit

Permalink
Merge pull request coreos#433 from zuercher/exclusive-open-cluster-yaml
Browse files Browse the repository at this point in the history
kube-aws: fail if configPath (cluster.yaml) already exists
  • Loading branch information
colhom committed Apr 25, 2016
2 parents 69871dc + 5445976 commit e541a59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion multi-node/aws/cmd/kube-aws/command_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func runCmdInit(cmd *cobra.Command, args []string) error {
return fmt.Errorf("Error parsing default config template: %v", err)
}

out, err := os.OpenFile(configPath, os.O_CREATE|os.O_WRONLY, 0600)
out, err := os.OpenFile(configPath, os.O_CREATE|os.O_WRONLY|os.O_EXCL, 0600)
if err != nil {
return fmt.Errorf("Error opening %s : %v", configPath, err)
}
Expand Down

0 comments on commit e541a59

Please sign in to comment.