12273: Skip non-regular files when uploading outputs to Keep.
[arvados.git] / services / crunch-run / crunchrun.go
index 27bfa88730788402d13282c18f15a21a4d93cfae..3fdd37402fada76813dc22e69251f6144da6e358 100644 (file)
@@ -857,7 +857,11 @@ func (runner *ContainerRunner) StartContainer() error {
        err := runner.Docker.ContainerStart(context.TODO(), runner.ContainerID,
                dockertypes.ContainerStartOptions{})
        if err != nil {
-               return fmt.Errorf("could not start container: %v", err)
+               var advice string
+               if strings.Contains(err.Error(), "no such file or directory") {
+                       advice = fmt.Sprintf("\nPossible causes: command %q is missing, the interpreter given in #! is missing, or script has Windows line endings.", runner.Container.Command[0])
+               }
+               return fmt.Errorf("could not start container: %v%s", err, advice)
        }
        runner.cStarted = true
        return nil