diff options
| author | Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> | 2025-05-06 12:35:21 +0200 |
|---|---|---|
| committer | Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> | 2025-05-06 12:35:21 +0200 |
| commit | 9c4985368aee638d982f30ea7bc5c7ee71ae3ab3 (patch) | |
| tree | 10b0bd88547c366b05404419b9e7dee1b1a1e270 /cmd | |
| parent | cd4e5a23852ca5f9af7f66f1daa9dfbf7d8e7376 (diff) | |
All: Fix staticcheck errors
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), |
