Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit 6a92833

Browse files
author
Dongsu Park
committed
Merge pull request #1577 from endocode/dongsu/fleetctl-stop-final-message
fleetctl: print out result message explicitly
2 parents 3a974af + 2dbfa32 commit 6a92833

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

fleetctl/stop.go

+5
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ func runStopUnit(args []string) (exit int) {
8585
}
8686

8787
exit = tryWaitForUnitStates(stopping, "stop", job.JobStateLoaded, getBlockAttempts(), os.Stdout)
88+
if exit == 0 {
89+
stderr("Successfully stopped units %v.", stopping)
90+
} else {
91+
stderr("Failed to stop units %v. exit == %d.", stopping, exit)
92+
}
8893

8994
return
9095
}

fleetctl/unload.go

+5
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ func runUnloadUnit(args []string) (exit int) {
6666
}
6767

6868
exit = tryWaitForUnitStates(wait, "unload", job.JobStateInactive, getBlockAttempts(), os.Stdout)
69+
if exit == 0 {
70+
stderr("Successfully unloaded units %v.", wait)
71+
} else {
72+
stderr("Failed to unload units %v. exit == %d.", wait, exit)
73+
}
6974

7075
return
7176
}

0 commit comments

Comments
 (0)