Add waza update command#288
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a first-class waza update command so upgrade notices can point users to a safer, discoverable update flow instead of a copy/paste installer one-liner.
Changes:
- Introduces
waza updatewith a confirmation prompt plus--yes/-yfor non-interactive updates, and provides guidance when Bash isn’t available. - Skips the background update check while
waza updateitself is running, and updates version notices to recommendwaza update. - Updates docs/CLI reference and adds unit tests covering the new command and updated notice text.
Show a summary per file
| File | Description |
|---|---|
| site/src/content/docs/reference/cli.mdx | Documents the new waza update command and behavior/requirements. |
| README.md | Updates update-notice guidance and adds waza update to command lists. |
| internal/version/check.go | Centralizes installer URL + default recommended update command; notice now recommends waza update. |
| internal/version/check_test.go | Updates notice assertion to match the new recommended update command text. |
| cmd/waza/root.go | Registers the new command and prevents update checks from running during waza update. |
| cmd/waza/cmd_update.go | Implements waza update including confirmation, --yes, and Bash detection. |
| cmd/waza/cmd_update_test.go | Adds tests for update confirmation/skip, missing Bash guidance, and update-check skipping. |
Copilot's findings
- Files reviewed: 7/7 changed files
- Comments generated: 1
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Waza already checks for newer releases, but users had to copy and run the raw installer command themselves. This adds a first-class
waza updatepath so the update notice can point to a safer, discoverable command.Summary
waza updatewith an explicit confirmation prompt before running the official installer.install.ps1for native Windows, including checksum verification and delayed replacement to avoid Windows locking the runningwaza.exe.--yes/-yfor scripted updates and clear guidance when the required installer shell is unavailable.waza updateand document OS-specific install/update behavior in README and the docs site.Testing
go test ./cmd/waza ./internal/versiongo test ./...cd site && npm ci --no-audit --no-fund && npm run buildinstall.ps1whenpwshis available