Skip to content

Commit 27fd341

Browse files
author
vinay-lanka
committed
Improve output message with config file creation
1 parent 88468f2 commit 27fd341

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cli/config/init.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,14 @@ func runInitCommand(cmd *cobra.Command, args []string) {
6262
os.Exit(errorcodes.ErrGeneric)
6363
}
6464

65-
msg := "Config file written to: " + configFile
65+
var absPath, err = filepath.Abs(destDir)
66+
if err != nil {
67+
feedback.Errorf("Cannot find absolute path: %v", err)
68+
os.Exit(errorcodes.ErrGeneric)
69+
}
70+
var configFileAbsPath = filepath.Join(absPath, defaultFileName)
71+
72+
msg := "Config file written to: " + configFileAbsPath
6673
logrus.Info(msg)
6774
feedback.Print(msg)
6875
}

0 commit comments

Comments
 (0)