]> Cypherpunks.ru repositories - goredo.git/blobdiff - run.go
DRY filepath.Abs/Rel
[goredo.git] / run.go
diff --git a/run.go b/run.go
index 90eb7e6ec1669c996efb04dd7a2c837b46cb2203..88adf66f2d9e4239b0596f82a9a0617f36d0438b 100644 (file)
--- a/run.go
+++ b/run.go
@@ -31,7 +31,6 @@ import (
        "os"
        "os/exec"
        "path"
-       "path/filepath"
        "strconv"
        "strings"
        "sync"
@@ -395,10 +394,7 @@ func runScript(tgtOrig string, errs chan error, forced, traced bool) error {
        stdoutPath := fdStdout.Name()
        fdStdout.Close()
        tmpPath := stdoutPath + ".3" // and for $3
-       tmpPathRel, err := filepath.Rel(cwd, tmpPath)
-       if err != nil {
-               panic(err)
-       }
+       tmpPathRel := mustRel(cwd, tmpPath)
        args = append(
                args,
                path.Join(dirPrefix, tgt),