Skip to content

Add core ID in outdated command output #1406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cli/outdated/outdated.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ func runOutdatedCommand(cmd *cobra.Command, args []string) {

// Prints outdated cores
tab := table.New()
tab.SetHeader(tr("Core name"), tr("Installed version"), tr("New version"))
tab.SetHeader(tr("ID"), tr("Installed version"), tr("New version"), tr("Name"))
if len(outdatedResp.OutdatedPlatforms) > 0 {
for _, p := range outdatedResp.OutdatedPlatforms {
tab.AddRow(p.Name, p.Installed, p.Latest)
tab.AddRow(p.Id, p.Installed, p.Latest, p.Name)
}
feedback.Print(tab.Render())
}
Expand Down
3 changes: 2 additions & 1 deletion i18n/data/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ msgstr "Connected"
msgid "Core"
msgstr "Core"

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

#: cli/core/list.go:84
#: cli/core/search.go:114
#: cli/outdated/outdated.go:62
msgid "ID"
msgstr "ID"

Expand Down Expand Up @@ -1192,6 +1192,7 @@ msgstr "Multiple libraries were found for \"{0}\""
#: cli/core/list.go:84
#: cli/core/search.go:114
#: cli/lib/list.go:125
#: cli/outdated/outdated.go:62
msgid "Name"
msgstr "Name"

Expand Down
8 changes: 4 additions & 4 deletions i18n/rice-box.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions test/test_outdated.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def test_outdated(run_command):
result = run_command("outdated")
assert result.ok
lines = [l.strip() for l in result.stdout.splitlines()]
assert lines[1].startswith("Arduino AVR Boards")
assert lines[4].startswith("USBHost")
assert "Arduino AVR Boards" in lines[1]
assert "USBHost" in lines[4]


def test_outdated_using_library_with_invalid_version(run_command, data_dir):
Expand Down
4 changes: 2 additions & 2 deletions test/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def test_upgrade(run_command):
result = run_command("outdated")
assert result.ok
lines = result.stdout.splitlines()
assert lines[1].startswith("Arduino AVR Boards")
assert lines[4].startswith("USBHost")
assert "Arduino AVR Boards" in lines[1]
assert "USBHost" in lines[4]

result = run_command("upgrade")
assert result.ok
Expand Down