node option also for shell and respect env $SHELL

This commit is contained in:
Christian Goll
2023-01-31 17:52:42 +01:00
parent 317cd5d4e0
commit 05237935eb
3 changed files with 18 additions and 2 deletions

View File

@@ -48,6 +48,11 @@ func runContainedCmd(args []string) error {
if err := c.Run(); err != nil {
fmt.Printf("Command exited non-zero, not rebuilding/updating VNFS image\n")
// defer is not called before os.Exit(0)
err = os.RemoveAll(tempDir)
if err != nil {
wwlog.Warn("Couldn't remove temp dir for ephermal mounts:", err)
}
os.Exit(0)
}
return nil
@@ -135,3 +140,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
func SetBinds(myBinds []string) {
binds = append(binds, myBinds...)
}
func SetNode(myNode string) {
nodeName = myNode
}