summaryrefslogtreecommitdiff
path: root/restart_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'restart_windows.go')
-rw-r--r--restart_windows.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/restart_windows.go b/restart_windows.go
index 4e239dd..59239fb 100644
--- a/restart_windows.go
+++ b/restart_windows.go
@@ -7,14 +7,12 @@ import (
func restart() {
if _, err := os.Stat(executable); err != nil {
- log.Fatalf("Unable to get executable path, %s", err)
- os.Exit(1)
+ log.Fatalf("Error getting executable path, %s", err)
}
log.Infof("Program found at %s.", executable)
wd, err := os.Getwd()
if err != nil {
- log.Fatalf("Unable to get working directory, %s", err)
- os.Exit(1)
+ log.Fatalf("Error getting working directory, %s", err)
}
log.Infof("Current working directory is %s.", wd)
_, err = os.StartProcess(executable, []string{}, &os.ProcAttr{
@@ -24,7 +22,6 @@ func restart() {
Sys: nil,
})
if err != nil {
- log.Fatalf("Unable to create new process, %s", err)
- os.Exit(1)
+ log.Fatalf("Error creating new process, %s", err)
}
}