]> Cypherpunks.ru repositories - goredo.git/blobdiff - run.go
Use more shorter Cwd-relative paths
[goredo.git] / run.go
diff --git a/run.go b/run.go
index ecf96e22e5428e44eeee29ef6de329d33689c0dd..7fa4deae08c35b428111e5773d5744eca32417cd 100644 (file)
--- a/run.go
+++ b/run.go
@@ -111,7 +111,7 @@ type RunError struct {
 func (e *RunError) Name() string {
        var name string
        if e.DoFile == "" {
-               name = e.Tgt.String()
+               name = e.Tgt.rel
        } else {
                name = fmt.Sprintf("%s (%s)", e.Tgt, e.DoFile)
        }
@@ -350,7 +350,7 @@ func runScript(tgt *Tgt, errs chan error, forced, traced bool) error {
                doFile = NewTgt(path.Join(ups...))
                if strings.HasPrefix(doFile.t, "default.") {
                        basename = basename[:len(basename)-(len(doFile.t)-len("default.")-len(".do"))-1]
-                       runErr.DoFile = doFile.String()
+                       runErr.DoFile = doFile.rel
                }
        }
 
@@ -365,7 +365,7 @@ func runScript(tgt *Tgt, errs chan error, forced, traced bool) error {
        // Prepare command line
        var cmdName string
        var args []string
-       if err = unix.Access(doFile.String(), unix.X_OK); err == nil {
+       if err = unix.Access(doFile.rel, unix.X_OK); err == nil {
                cmdName = doFile.t
                args = make([]string, 0, 3)
        } else {