migrate to the awesome go-cmd/cmd

This commit is contained in:
Jeff Carr 2024-11-08 07:17:27 -06:00
parent 9878b8fe6c
commit dcf9f72264
1 changed files with 4 additions and 4 deletions

View File

@ -58,8 +58,8 @@ func main() {
} else { } else {
trycount += 1 trycount += 1
log.Info("actually run: git pull:", repo.Status.Path()) log.Info("actually run: git pull:", repo.Status.Path())
if err := shell.PwdRun(repo.Status.Path(), pull); err != nil { if result := repo.Status.Run(pull); result.Error != nil {
log.Info("git pull error:", err) log.Info("git pull error:", result.Error)
errcount += 1 errcount += 1
} }
} }
@ -123,7 +123,7 @@ func main() {
if !argv.NoWork { if !argv.NoWork {
log.Info("Creating", wdir+"/go.work") log.Info("Creating", wdir+"/go.work")
rv.MakeGoWork() 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 { if _, err := os.Stat("go.work"); err == nil {
return newpwd, nil return newpwd, nil
} }
shell.RunPath(newpwd, []string{"go", "work", "init"}) shell.PathRun(newpwd, []string{"go", "work", "init"})
if shell.Exists("go.work") { if shell.Exists("go.work") {
return newpwd, nil return newpwd, nil
} }