X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/50d2969bdaf2fbbfbe00d35ec8339b166eee8001..9f35a3cf10e5d261d83556d5b33f242966101f02:/sdk/go/crunchrunner/crunchrunner.go diff --git a/sdk/go/crunchrunner/crunchrunner.go b/sdk/go/crunchrunner/crunchrunner.go index 8dffd4594f..5e0e101e77 100644 --- a/sdk/go/crunchrunner/crunchrunner.go +++ b/sdk/go/crunchrunner/crunchrunner.go @@ -115,10 +115,12 @@ func setupCommand(cmd *exec.Cmd, taskp TaskDef, outdir string, replacements map[ return "", "", "", err } if taskp.KeepTmpOutput { - // Is there an os.Copy? - copyFile(v, outdir+"/"+k) + err = copyFile(v, outdir+"/"+k) } else { - os.Symlink(v, outdir+"/"+k) + err = os.Symlink(v, outdir+"/"+k) + } + if err != nil { + return "", "", "", err } } } @@ -222,8 +224,8 @@ func getKeepTmp(outdir string) (manifest string, err error) { return "", err } collection := arvados.Collection{} - json.Unmarshal(buf, &collection) - return collection.ManifestText, nil + err = json.Unmarshal(buf, &collection) + return collection.ManifestText, err } func runner(api IArvadosClient, @@ -364,9 +366,9 @@ func runner(api IArvadosClient, manifest, err = getKeepTmp(outdir) } else { manifest, err = WriteTree(kc, outdir) - if err != nil { - return TempFail{err} - } + } + if err != nil { + return TempFail{err} } // Set status