X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=run.go;h=aab8e9a5c7eb4b9d6d1b41acce7939b14681544a;hb=6266daf3965402077cb14e8997b20695657394db;hp=40fad74af0f20f98dc517020faca88c86df57359;hpb=edb601644735972fac3efcdc27849b5b9b1f5fb7;p=goredo.git diff --git a/run.go b/run.go index 40fad74..aab8e9a 100644 --- a/run.go +++ b/run.go @@ -77,8 +77,6 @@ type RunErr struct { Err error } -func (e RunErr) Unwrap() error { return e.Err } - func (e *RunErr) Name() string { var name string if e.DoFile == "" { @@ -268,12 +266,14 @@ func runScript(tgtOrig string, errs chan error, traced bool) error { } // Determine basename and DIRPREFIX + doFileRelPath := doFile ents := strings.Split(cwd, "/") ents = ents[len(ents)-upLevels:] dirPrefix := path.Join(ents...) cwdOrig := cwd for i := 0; i < upLevels; i++ { cwd = path.Join(cwd, "..") + doFileRelPath = path.Join("..", doFileRelPath) } cwd = path.Clean(cwd) doFilePath := path.Join(cwd, doFile) @@ -281,10 +281,10 @@ func runScript(tgtOrig string, errs chan error, traced bool) error { runErr := RunErr{Tgt: tgtOrig} if strings.HasPrefix(doFile, "default.") { basename = tgt[:len(tgt)-(len(doFile)-len("default.")-len(".do"))-1] - runErr.DoFile = doFile + runErr.DoFile = doFileRelPath } - if err = writeDep(fdDep, cwd, doFile); err != nil { + if err = writeDep(fdDep, cwdOrig, doFileRelPath); err != nil { cleanup() return TgtErr{tgtOrig, err} }