File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -1088,6 +1088,7 @@ $ scw inspect myserver | jq '.[0].public_ip.address'
10881088
10891089#### Features
10901090
1091+ * Syncing cache to disk after server creation when running ` scw run ` in a non-detached mode
10911092* Bump to Golang 1.5
10921093* Support --tmp-ssh-key ` scw {run,create} ` option ([ #99 ] ( https://github.com/scaleway/scaleway-cli/issues/99 ) )
10931094* Support -f ` scw run --rm ` option ([ #117 ] ( https://github.com/scaleway/scaleway-cli/issues/117 ) )
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import (
1515 "sync"
1616
1717 "github.com/scaleway/scaleway-cli/vendor/code.google.com/p/go-uuid/uuid"
18+ "github.com/scaleway/scaleway-cli/vendor/github.com/Sirupsen/logrus"
1819 "github.com/scaleway/scaleway-cli/vendor/github.com/renstrom/fuzzysearch/fuzzy"
1920)
2021
@@ -177,6 +178,8 @@ func (c *ScalewayCache) Save() error {
177178 c .Lock .Lock ()
178179 defer c .Lock .Unlock ()
179180
181+ logrus .Debugf ("Writing cache file to disk" )
182+
180183 if c .Modified {
181184 file , err := ioutil .TempFile ("" , "" )
182185 if err != nil {
Original file line number Diff line number Diff line change @@ -103,6 +103,9 @@ func Run(ctx CommandContext, args RunArgs) error {
103103 if args .Detach {
104104 fmt .Fprintln (ctx .Stdout , serverID )
105105 return nil
106+ } else {
107+ // Sync cache on disk
108+ ctx .API .Sync ()
106109 }
107110
108111 if args .Attach {
You can’t perform that action at this time.
0 commit comments