mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
Force namespace via cmdline parameter (#53)
* Force name via cmdline parameter * Use a library to parse CLI flags * Use less env vars * Document it
This commit is contained in:
@@ -34,7 +34,7 @@ func TempFile(txt string) (string, func(), error) {
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
return file.Name(), func() { os.Remove(file.Name()) }, nil
|
||||
return file.Name(), func() { _ = os.Remove(file.Name()) }, nil
|
||||
}
|
||||
|
||||
type CmdError struct {
|
||||
@@ -49,6 +49,7 @@ func (e CmdError) Error() string {
|
||||
}
|
||||
|
||||
func RunCommand(cmd []string, env map[string]string) (string, error) {
|
||||
log.Debugf("Starting command: %s", cmd)
|
||||
prog := exec.Command(cmd[0], cmd[1:]...)
|
||||
prog.Env = os.Environ()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user