"os"
"os/exec"
"path"
- "path/filepath"
"strconv"
"strings"
"sync"
var depInfo *DepInfo
fdDep, err := os.Open(path.Join(redoDir, tgt+DepSuffix))
if err != nil {
- if os.IsNotExist(err) {
+ if errors.Is(err, fs.ErrNotExist) {
err = errors.New("was not built: no .rec")
}
goto Finish
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),
return
}
tmpExists = true
- } else if !os.IsNotExist(err) {
+ } else if !errors.Is(err, fs.ErrNotExist) {
runErr.Err = ErrLine(err)
errs <- runErr
return