Skip to content

Commit 8ac795b

Browse files
committed
Remove server entry from cache on 'stop -t'
1 parent 910d845 commit 8ac795b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,7 @@ $ scw inspect myserver | jq '.[0].public_ip.address'
10431043
* `scw stop server1 server2` doesn't exit on first stopping failure
10441044
* `scw run IMAGE [COMMAND]`, default *COMMAND* is now `if [ -x /bin/bash ]; then exec /bin/bash; else exec /bin/sh; fi`
10451045
* `scw run|create SNAPSHOT`, raised an error if snapshot does not have base volume
1046+
* `scw stop -t` removes server entry from cache
10461047

10471048
### 1.1.0 (2015-06-12)
10481049

commands/stop.go

+3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ func runStop(cmd *types.Command, args []string) {
7373
hasError = true
7474
}
7575
}
76+
if stopT {
77+
cmd.API.Cache.RemoveServer(serverID)
78+
}
7679
fmt.Println(needle)
7780
}
7881
}

0 commit comments

Comments
 (0)