File tree 1 file changed +0
-19
lines changed
1 file changed +0
-19
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,10 @@ import (
24
24
25
25
"github.com/arduino/arduino-cli/commands"
26
26
"github.com/arduino/arduino-cli/commands/lib"
27
- "github.com/arduino/arduino-cli/internal/cli/configuration"
28
27
"github.com/arduino/arduino-cli/internal/cli/feedback"
29
28
"github.com/arduino/arduino-cli/internal/cli/feedback/result"
30
29
"github.com/arduino/arduino-cli/internal/cli/instance"
31
30
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
32
- "github.com/arduino/go-paths-helper"
33
31
"github.com/sirupsen/logrus"
34
32
"github.com/spf13/cobra"
35
33
)
@@ -222,20 +220,3 @@ func (res librarySearchResult) String() string {
222
220
223
221
return out .String ()
224
222
}
225
-
226
- // indexNeedsUpdating returns whether library_index.json needs updating
227
- func indexNeedsUpdating (timeout time.Duration ) bool {
228
- // Library index path is constant (relative to the data directory).
229
- // It does not depend on board manager URLs or any other configuration.
230
- dataDir := configuration .Settings .GetString ("directories.Data" )
231
- indexPath := paths .New (dataDir ).Join ("library_index.json" )
232
- // Verify the index file exists and we can read its fstat attrs.
233
- if indexPath .NotExist () {
234
- return true
235
- }
236
- info , err := indexPath .Stat ()
237
- if err != nil {
238
- return true
239
- }
240
- return time .Since (info .ModTime ()) > timeout
241
- }
You can’t perform that action at this time.
0 commit comments