mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-27 11:59:40 -08:00
fix(cli): check for empty args(cache/get)
This commit is contained in:
parent
63802ca046
commit
96df24789d
12
.vscode/launch.json
vendored
12
.vscode/launch.json
vendored
|
@ -122,6 +122,16 @@
|
|||
"request": "attach",
|
||||
"port": 9229,
|
||||
"preDebugTask": "func: host start"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Debug CLI(cache)",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "debug",
|
||||
"program": "${workspaceRoot}/src",
|
||||
"args": [
|
||||
"cache",
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
||||
|
|
|
@ -32,6 +32,10 @@ You can do the following:
|
|||
},
|
||||
Args: cobra.OnlyValidArgs,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if len(args) == 0 {
|
||||
_ = cmd.Help()
|
||||
return
|
||||
}
|
||||
env := &environment.ShellEnvironment{
|
||||
Version: cliVersion,
|
||||
}
|
||||
|
|
|
@ -27,6 +27,10 @@ This command is used to get the value of the following variables:
|
|||
},
|
||||
Args: cobra.OnlyValidArgs,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if len(args) == 0 {
|
||||
_ = cmd.Help()
|
||||
return
|
||||
}
|
||||
env := &environment.ShellEnvironment{
|
||||
Version: cliVersion,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue