summaryrefslogtreecommitdiff
path: root/cmd/eduvpn-cli
diff options
context:
space:
mode:
authorJeroen Wijenbergh <jeroen.wijenbergh@geant.org>2025-05-06 12:35:21 +0200
committerJeroen Wijenbergh <jeroen.wijenbergh@geant.org>2025-05-06 12:35:21 +0200
commit9c4985368aee638d982f30ea7bc5c7ee71ae3ab3 (patch)
tree10b0bd88547c366b05404419b9e7dee1b1a1e270 /cmd/eduvpn-cli
parentcd4e5a23852ca5f9af7f66f1daa9dfbf7d8e7376 (diff)
All: Fix staticcheck errors
Diffstat (limited to 'cmd/eduvpn-cli')
-rw-r--r--cmd/eduvpn-cli/main.go7
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),