summaryrefslogtreecommitdiff
path: root/unix.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-18 14:21:38 -0600
committerJeff Carr <[email protected]>2024-01-18 14:21:38 -0600
commit1d2dacab264e798e5d09325939b5760d18995b6a (patch)
tree28721f43763c144bf2b7d429a6496a6db2775ec0 /unix.go
parente741567fef760869a8ba6ea6904aecdb701546b0 (diff)
strangely time.Sleep() doesn't workv0.12.12
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'unix.go')
-rw-r--r--unix.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/unix.go b/unix.go
index 6d3615c..08cfb00 100644
--- a/unix.go
+++ b/unix.go
@@ -9,6 +9,7 @@ import (
"path/filepath"
"regexp"
"strings"
+ "time"
"go.wit.com/log"
)
@@ -123,6 +124,11 @@ func runCmd(path string, parts []string) (error, bool, string) {
return RunCmd(fulldir, parts)
}
+func RunCmdNew(workingpath string, parts []string) (error, bool, string) {
+ time.Sleep(10 * time.Second)
+ return RunCmd(workingpath, parts)
+}
+
func RunCmd(workingpath string, parts []string) (error, bool, string) {
if len(parts) == 0 {
log.Warn("command line was empty")
@@ -136,6 +142,9 @@ func RunCmd(workingpath string, parts []string) (error, bool, string) {
parts = parts[1:]
log.Warn("working path =", workingpath, "thing =", thing, "cmdline =", parts)
+ if thing == "pwd" {
+ os.Exit(-1)
+ }
// Create the command
cmd := exec.Command(thing, parts...)