From 9c4985368aee638d982f30ea7bc5c7ee71ae3ab3 Mon Sep 17 00:00:00 2001 From: Jeroen Wijenbergh Date: Tue, 6 May 2025 12:35:21 +0200 Subject: All: Fix staticcheck errors --- cmd/eduvpn-cli/main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cmd/eduvpn-cli/main.go') 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), -- cgit v1.2.3