[agent/codex:gpt-5.4-mini] Read ~/spec/code/core/go/cli/RFC.md fully. Find ONE feature ... #49

Merged
Virgil merged 1 commit from agent/read---spec-code-core-go-cli-rfc-md-full into dev 2026-04-02 05:17:42 +00:00
2 changed files with 15 additions and 4 deletions
Showing only changes of commit 58f07603cd - Show all commits

View file

@ -165,9 +165,6 @@ func addPkgUpdateCommand(parent *cobra.Command) {
Short: i18n.T("cmd.pkg.update.short"),
Long: i18n.T("cmd.pkg.update.long"),
RunE: func(cmd *cobra.Command, args []string) error {
if !updateAll && len(args) == 0 {
return errors.New(i18n.T("cmd.pkg.error.specify_package"))
}
return runPkgUpdate(args, updateAll)
},
}
@ -197,7 +194,7 @@ func runPkgUpdate(packages []string, all bool) error {
}
var toUpdate []string
if all {
if all || len(packages) == 0 {
for _, r := range reg.List() {
toUpdate = append(toUpdate, r.Name)
}

View file

@ -291,3 +291,17 @@ func TestRunPkgSearch_RespectsLimitWithCachedResults(t *testing.T) {
assert.Contains(t, out, "core-alpha")
assert.NotContains(t, out, "core-beta")
}
func TestRunPkgUpdate_NoArgs_UpdatesAll(t *testing.T) {
tmp := setupOutdatedRegistry(t)
withWorkingDir(t, tmp)
out := capturePkgOutput(t, func() {
err := runPkgUpdate(nil, false)
require.NoError(t, err)
})
assert.Contains(t, out, "updating")
assert.Contains(t, out, "core-fresh")
assert.Contains(t, out, "core-stale")
}