mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-02-21 02:55:37 -08:00
parent
3896b78e1d
commit
57d481c9b4
3
.vscode/launch.json
vendored
3
.vscode/launch.json
vendored
|
@ -9,7 +9,8 @@
|
|||
"program": "${workspaceRoot}/src",
|
||||
"args": [
|
||||
"--config=${workspaceRoot}/themes/jandedobbeleer.omp.json",
|
||||
"--shell=pwsh"
|
||||
"--shell=pwsh",
|
||||
"--pwd=/Users/jan/Projects/test"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -397,7 +397,12 @@ func (env *ShellEnvironment) RunCommand(command string, args ...string) (string,
|
|||
env.log(Error, "RunCommand", errorStr)
|
||||
return output, cmdErr
|
||||
}
|
||||
output := strings.TrimSpace(out.String())
|
||||
// some silly commands return 0 and the output is in stderr instead of stdout
|
||||
result := out.String()
|
||||
if len(result) == 0 {
|
||||
result = err.String()
|
||||
}
|
||||
output := strings.TrimSpace(result)
|
||||
env.log(Debug, "RunCommand", output)
|
||||
return output, nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue