cmd/run: Style fixes
Fallout from 4536e2c8c2
https://github.com/containers/toolbox/pull/872
This commit is contained in:
parent
26ae0bb896
commit
208d553cec
|
@ -322,11 +322,9 @@ func runCommandWithFallbacks(container string, command []string, emitEscapeSeque
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
case 125:
|
case 125:
|
||||||
err = fmt.Errorf("failed to invoke 'podman exec' in container %s", container)
|
return fmt.Errorf("failed to invoke 'podman exec' in container %s", container)
|
||||||
return err
|
|
||||||
case 126:
|
case 126:
|
||||||
err = fmt.Errorf("failed to invoke command %s in container %s", command[0], container)
|
return fmt.Errorf("failed to invoke command %s in container %s", command[0], container)
|
||||||
return err
|
|
||||||
case 127:
|
case 127:
|
||||||
if pathPresent, _ := isPathPresent(container, workDir); !pathPresent {
|
if pathPresent, _ := isPathPresent(container, workDir); !pathPresent {
|
||||||
if runFallbackWorkDirsIndex < len(runFallbackWorkDirs) {
|
if runFallbackWorkDirsIndex < len(runFallbackWorkDirs) {
|
||||||
|
@ -343,8 +341,7 @@ func runCommandWithFallbacks(container string, command []string, emitEscapeSeque
|
||||||
fmt.Fprintf(os.Stderr, "Using %s instead.\n", workDir)
|
fmt.Fprintf(os.Stderr, "Using %s instead.\n", workDir)
|
||||||
runFallbackWorkDirsIndex++
|
runFallbackWorkDirsIndex++
|
||||||
} else {
|
} else {
|
||||||
err = fmt.Errorf("directory %s not found in container %s", workDir, container)
|
return fmt.Errorf("directory %s not found in container %s", workDir, container)
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if fallbackToBash && runFallbackCommandsIndex < len(runFallbackCommands) {
|
if fallbackToBash && runFallbackCommandsIndex < len(runFallbackCommands) {
|
||||||
|
@ -358,8 +355,7 @@ func runCommandWithFallbacks(container string, command []string, emitEscapeSeque
|
||||||
|
|
||||||
runFallbackCommandsIndex++
|
runFallbackCommandsIndex++
|
||||||
} else {
|
} else {
|
||||||
err = fmt.Errorf("command %s not found in container %s", command[0], container)
|
return fmt.Errorf("command %s not found in container %s", command[0], container)
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue