chore(cmd): minor CLI help-text hardening#71
Merged
Conversation
AppVeyor sets CI=True; some Kubernetes pipelines use CI=1. The strict equality check silently opened the TUI instead of running CI checks on those platforms. Accept any non-empty, non-"0", non-"false" value via strings.EqualFold, matching npm/yarn and other CI-aware tools.
-math.MinInt64 wraps back to MinInt64 in two's-complement. Compute the magnitude via uint64 arithmetic (which is overflow-safe) and route it through a matching uint64 formatter instead of casting back to int64.
If offset ever exceeds len(files) the slice panics. All current mutation paths reset the offset, but the clamp in the renderer itself was incomplete — it protected the end index but not the start. One guard line closes the gap before any future refactor can reopen it.
…n resolver DOCKER_HOST was checked ahead of CONTAINER_CONNECTION and the active Podman connection, so a legacy DOCKER_HOST in the environment would silently shadow an explicit CONTAINER_CONNECTION=staging override. Move DOCKER_HOST to a last-resort fallback, consulted only when no Podman-specific env var or config file names a connection.
- completion: fix Use line from [bash|...] to <shell> (MEDIUM-3) - completion: expand Short to name the four supported shells - cache prune: improve --dry-run usage text (MEDIUM-4) - cache prune: replace terse hint with three-row command table - compare: add (exit 1 on regression) to Short (LOW-3) - compare: add grep verdict example to --help Examples - build: document layerx-flag-before-build ordering rule in Long (LOW-4) - init: add hidden --flavor alias for --flavour (LOW-1)
…DOCKER_HOST order b4dbcf6 moved DOCKER_HOST below the connections file in resolution order. Update the test fixture to use an empty Default so DOCKER_HOST is actually reached as a fallback, which is the scenario the test is documenting.
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.
Summary
completion: fixUseline from[bash|zsh|fish|powershell](implies optional) to<shell>(required); expandShortto name all four shellscache prune: improve--dry-runflag usage text; replace the two-line terse hint with a three-row command table that surfaces--dry-runexplicitlycompare: add(exit 1 on regression)toShort; addgrep '^verdict:'example to--helpExamplesbuild: add flag-ordering note toLongexplaining why--engine/--no-cache/--jsonmust appear beforebuildinit: add hidden--flavoralias for--flavourso American-spelling users aren't blockedAll changes are help-text or additive-alias only — no behaviour changes.
Test Plan
go build ./...passesgo vet ./...passeslayerx completion --helpshowscompletion <shell>in usage linelayerx cache prune(bare) shows the new three-row hint when entries existlayerx compare --helpshows(exit 1 on regression)in short description and grep examplelayerx build --helpshows flag-ordering note in Long descriptionlayerx init --flavor nodeworks identically to--flavour node