We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b39d4a commit 0884032Copy full SHA for 0884032
cmd/clusterctl/cmd/util.go
@@ -38,15 +38,15 @@ func printYamlOutput(printer client.YamlPrinter, outputFile string) error {
38
if err != nil {
39
return err
40
}
41
- outputFile = filepath.Clean(strings.TrimSpace(outputFile))
42
yaml = append(yaml, '\n')
+ outputFile = strings.TrimSpace(outputFile)
43
if outputFile == "" || outputFile == "-" {
44
if _, err := os.Stdout.Write(yaml); err != nil {
45
return errors.Wrap(err, "failed to write yaml to Stdout")
46
47
return nil
48
49
-
+ outputFile = filepath.Clean(outputFile)
50
if err := os.WriteFile(outputFile, yaml, 0600); err != nil {
51
return errors.Wrap(err, "failed to write to destination file")
52
0 commit comments