A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/arduino/arduino-fwuploader/commit/0e0fb39ce6c3b03310f4be81a49db2baac363b15 below:

Clean up temporary files on exit (#159) · arduino/arduino-fwuploader@0e0fb39 · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+4

-1

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+4

-1

lines changed Original file line number Diff line number Diff line change

@@ -229,7 +229,7 @@ func DownloadIndex(indexURL string) (*paths.Path, error) {

229 229

if err != nil {

230 230

return nil, err

231 231

}

232 -

defer tempDir.Remove()

232 +

defer tempDir.RemoveAll()

233 233 234 234

// Download index

235 235

tmpGZIndex := tempDir.Join("index.gz")

Original file line number Diff line number Diff line change

@@ -89,6 +89,7 @@ func GetPackageIndex() (*packageindex.Index, error) {

89 89 90 90

// GetFirmwareIndex downloads and loads the arduino-fwuploader module_firmware_index.json

91 91

func GetFirmwareIndex() (*firmwareindex.Index, error) {

92 +

defer globals.FwUploaderPath.RemoveAll()

92 93

indexPath, err := download.DownloadIndex(globals.ModuleFirmwareIndexGZURL)

93 94

if err != nil {

94 95

logrus.Error(err)

Original file line number Diff line number Diff line change

@@ -22,6 +22,7 @@ import (

22 22

"testing"

23 23 24 24

"github.com/arduino/arduino-cli/arduino/cores/packageindex"

25 +

"github.com/arduino/arduino-fwuploader/cli/globals"

25 26

"github.com/arduino/go-paths-helper"

26 27

"github.com/stretchr/testify/require"

27 28

)

@@ -47,4 +48,5 @@ func TestGetFirmwareIndex(t *testing.T) {

47 48

index, err := GetFirmwareIndex()

48 49

require.NoError(t, err)

49 50

require.NotNil(t, index)

51 +

require.NoDirExists(t, globals.FwUploaderPath.String())

50 52

}

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4