Skip to content

Commit 0382c1f

Browse files
fix CR
1 parent 605ac83 commit 0382c1f

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

Diff for: arduino/cores/cores.go

-3
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,5 @@ func (release *PlatformRelease) HasMetadata() bool {
418418
}
419419

420420
installedJSONPath := release.InstallDir.Join("installed.json")
421-
if installedJSONPath == nil {
422-
return false
423-
}
424421
return installedJSONPath.Exist()
425422
}

Diff for: internal/cli/core/upgrade.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func Upgrade(inst *rpc.Instance, args []string, skipPostInstall bool) {
8282
if response == nil || response.Platform == nil {
8383
return
8484
}
85-
if !response.Platform.Indexed || (response.Platform.MissingMetadata && !response.Platform.Indexed) {
85+
if !response.Platform.Indexed {
8686
feedback.Warning(tr("missing package index for %s, future updates cannot be guaranteed", response.Platform.Id))
8787
}
8888
}

Diff for: internal/integrationtest/daemon/daemon_test.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import (
1919
"context"
2020
"fmt"
2121
"io"
22-
"os"
2322
"testing"
2423
"time"
2524

@@ -457,9 +456,9 @@ func TestDaemonCoreUpgradePlatform(t *testing.T) {
457456
grpcInst := cli.Create()
458457
updateIndexAndInstallPlatform(cli, grpcInst, "3.1.0")
459458

460-
// remove installed.json{
459+
// remove installed.json
461460
x := env.RootDir().Join("A/packages/esp8266/hardware/esp8266/3.1.0/installed.json")
462-
require.NoError(t, os.Remove(x.String()))
461+
require.NoError(t, x.Remove())
463462

464463
plUpgrade, err := grpcInst.PlatformUpgrade(context.Background(), "esp8266", "esp8266", true)
465464
require.NoError(t, err)
@@ -507,7 +506,7 @@ func TestDaemonCoreUpgradePlatform(t *testing.T) {
507506
refreshInstance(t, grpcInst)
508507

509508
x := env.RootDir().Join("A/packages/esp8266/hardware/esp8266/3.1.0/installed.json")
510-
require.NoError(t, os.Remove(x.String()))
509+
require.NoError(t, x.Remove())
511510
}
512511

513512
plUpgrade, err := grpcInst.PlatformUpgrade(context.Background(), "esp8266", "esp8266", true)

Diff for: rpc/cc/arduino/cli/commands/v1/common.pb.go

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: rpc/cc/arduino/cli/commands/v1/common.proto

+3-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ message Platform {
104104
HelpResources help = 12;
105105
// If true the platform is indexed
106106
bool indexed = 13;
107-
// This field is true when the platform is installed with the Arduino IDE 1.8
107+
// This field is true when the platform is installed with the Arduino IDE 1.8.
108+
// If the platform is also not indexed it may fail to work correctly in some circumstances,
109+
// and it may need to be re-installed.
108110
bool missing_metadata = 14;
109111
}
110112

Diff for: rpc/cc/arduino/cli/commands/v1/core.pb.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: rpc/cc/arduino/cli/commands/v1/core.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ message PlatformUpgradeResponse {
9797
DownloadProgress progress = 1;
9898
// Description of the current stage of the upgrade.
9999
TaskProgress task_progress = 2;
100-
// Platform to be upgraded.
100+
// The upgraded platform.
101101
Platform platform = 3;
102102
}
103103

0 commit comments

Comments
 (0)