summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-08 07:17:27 -0600
committerJeff Carr <[email protected]>2024-11-08 07:17:27 -0600
commitdcf9f72264f99babcddd8f2ece3ce88b11966032 (patch)
treede4c9aa8eda1d8da3752f3e77183bd68bd250613
parent9878b8fe6cce13c48bdaebdfe0dc8266268b7da9 (diff)
migrate to the awesome go-cmd/cmdv0.5.6
-rw-r--r--main.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/main.go b/main.go
index 08cfbe3..8c29b2d 100644
--- a/main.go
+++ b/main.go
@@ -58,8 +58,8 @@ func main() {
} else {
trycount += 1
log.Info("actually run: git pull:", repo.Status.Path())
- if err := shell.PwdRun(repo.Status.Path(), pull); err != nil {
- log.Info("git pull error:", err)
+ if result := repo.Status.Run(pull); result.Error != nil {
+ log.Info("git pull error:", result.Error)
errcount += 1
}
}
@@ -123,7 +123,7 @@ func main() {
if !argv.NoWork {
log.Info("Creating", wdir+"/go.work")
rv.MakeGoWork()
- shell.RunPath(wdir, []string{"go", "work", "use"})
+ shell.PathRun(wdir, []string{"go", "work", "use"})
}
}
@@ -153,7 +153,7 @@ func findWorkFile() (string, error) {
if _, err := os.Stat("go.work"); err == nil {
return newpwd, nil
}
- shell.RunPath(newpwd, []string{"go", "work", "init"})
+ shell.PathRun(newpwd, []string{"go", "work", "init"})
if shell.Exists("go.work") {
return newpwd, nil
}