diff options
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/eduvpn-cli/main.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd/eduvpn-cli/main.go b/cmd/eduvpn-cli/main.go index d8942c5..2a990f2 100644 --- a/cmd/eduvpn-cli/main.go +++ b/cmd/eduvpn-cli/main.go @@ -99,8 +99,8 @@ func stateCallback(_ client.FSMStateID, newState client.FSMStateID, data interfa } if newState == client.StateAskLocation { - // defer not run due to os.Exit - os.RemoveAll(dir) + // removing is best effort + _ = os.RemoveAll(dir) fmt.Fprint(os.Stderr, "An invalid secure location is stored. This CLI doesn't support interactively choosing a location yet. Give a correct location with the -country-code flag") os.Exit(1) } @@ -144,7 +144,8 @@ func printConfig(url string, cc string, srvType srvtypes.Type, prof string, debu if err != nil { return err } - defer os.RemoveAll(dir) + // removing is best effort + defer os.RemoveAll(dir) //nolint:errcheck c, err = client.New( "org.eduvpn.app.linux", fmt.Sprintf("%s-cli", version.Version), |
