mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-10 04:54:03 -08:00
parent
3896b78e1d
commit
57d481c9b4
3
.vscode/launch.json
vendored
3
.vscode/launch.json
vendored
|
@ -9,7 +9,8 @@
|
||||||
"program": "${workspaceRoot}/src",
|
"program": "${workspaceRoot}/src",
|
||||||
"args": [
|
"args": [
|
||||||
"--config=${workspaceRoot}/themes/jandedobbeleer.omp.json",
|
"--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)
|
env.log(Error, "RunCommand", errorStr)
|
||||||
return output, cmdErr
|
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)
|
env.log(Debug, "RunCommand", output)
|
||||||
return output, nil
|
return output, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue