Skip to content

Commit 1c3a2df

Browse files
authored
Add core ID in outdated command output (#1406)
1 parent b9b7a87 commit 1c3a2df

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

Diff for: cli/outdated/outdated.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ func runOutdatedCommand(cmd *cobra.Command, args []string) {
5959

6060
// Prints outdated cores
6161
tab := table.New()
62-
tab.SetHeader(tr("Core name"), tr("Installed version"), tr("New version"))
62+
tab.SetHeader(tr("ID"), tr("Installed version"), tr("New version"), tr("Name"))
6363
if len(outdatedResp.OutdatedPlatforms) > 0 {
6464
for _, p := range outdatedResp.OutdatedPlatforms {
65-
tab.AddRow(p.Name, p.Installed, p.Latest)
65+
tab.AddRow(p.Id, p.Installed, p.Latest, p.Name)
6666
}
6767
feedback.Print(tab.Render())
6868
}

Diff for: i18n/data/en.po

+2-1
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ msgstr "Connected"
378378
msgid "Core"
379379
msgstr "Core"
380380

381-
#: cli/outdated/outdated.go:62
382381
#: cli/update/update.go:99
383382
msgid "Core name"
384383
msgstr "Core name"
@@ -914,6 +913,7 @@ msgstr "Global variables use {0} bytes of dynamic memory."
914913

915914
#: cli/core/list.go:84
916915
#: cli/core/search.go:114
916+
#: cli/outdated/outdated.go:62
917917
msgid "ID"
918918
msgstr "ID"
919919

@@ -1192,6 +1192,7 @@ msgstr "Multiple libraries were found for \"{0}\""
11921192
#: cli/core/list.go:84
11931193
#: cli/core/search.go:114
11941194
#: cli/lib/list.go:125
1195+
#: cli/outdated/outdated.go:62
11951196
msgid "Name"
11961197
msgstr "Name"
11971198

Diff for: i18n/rice-box.go

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

Diff for: test/test_outdated.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def test_outdated(run_command):
3333
result = run_command("outdated")
3434
assert result.ok
3535
lines = [l.strip() for l in result.stdout.splitlines()]
36-
assert lines[1].startswith("Arduino AVR Boards")
37-
assert lines[4].startswith("USBHost")
36+
assert "Arduino AVR Boards" in lines[1]
37+
assert "USBHost" in lines[4]
3838

3939

4040
def test_outdated_using_library_with_invalid_version(run_command, data_dir):

Diff for: test/test_upgrade.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def test_upgrade(run_command):
3333
result = run_command("outdated")
3434
assert result.ok
3535
lines = result.stdout.splitlines()
36-
assert lines[1].startswith("Arduino AVR Boards")
37-
assert lines[4].startswith("USBHost")
36+
assert "Arduino AVR Boards" in lines[1]
37+
assert "USBHost" in lines[4]
3838

3939
result = run_command("upgrade")
4040
assert result.ok

0 commit comments

Comments
 (0)