fix: sharpen first-run error and confirmation messages#77
Merged
Conversation
A user whose container engine is not running hit a dead end: the error named the failure but never mentioned that layerx can read a saved-image archive straight from disk, with no engine required. Both the CLI message and the interactive error screen now point at that fallback, worded engine-agnostically so it applies to Docker and Podman alike. The error screen also wraps long messages to the terminal width instead of letting them overflow on one line. The archive-infra error previously suggested freeing disk space on every failure, including I/O errors on network mounts where that advice is wrong. It now shows the disk-space hint only when the cause is genuinely a full disk (ENOSPC). Finally, the --json write confirmation now reads as a complete sentence with the layerx: prefix used elsewhere on stderr.
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
Improves the messages a user sees on their first run — particularly when no container engine is available — and tightens a couple of related wording inconsistencies.
Changes
TMPDIRwhen the underlying cause is actually a full disk (ENOSPC); other I/O failures no longer show a misleading hint.--jsonconfirmation prefix. The write confirmation now readslayerx: wrote analysis to <path>, matching thelayerx:prefix used elsewhere on stderr.Testing
go build ./...andgo vet ./...clean.cmd/errors_test.goandtui/model_test.gocover the new hint text, theENOSPC-gated disk hint, and the message wrapping.