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 0706bdb commit d3b5d7fCopy full SHA for d3b5d7f
cmd/root.go
@@ -14,7 +14,7 @@ import (
14
15
// RootCmd represents the base command when called without any subcommands.
16
var RootCmd = &cobra.Command{
17
- Use: BinaryName,
+ Use: getCommandName(),
18
Short: "A friendly command-line interface to Exercism.",
19
Long: `A command-line interface for Exercism.
20
@@ -41,8 +41,12 @@ func Execute() {
41
}
42
43
44
+func getCommandName() string {
45
+ return os.Args[0]
46
+}
47
+
48
func init() {
- BinaryName = os.Args[0]
49
+ BinaryName = getCommandName()
50
config.SetDefaultDirName(BinaryName)
51
Out = os.Stdout
52
Err = os.Stderr
0 commit comments