Repository navigation
Conversation
`copyConfigurationToReadOnly` returned early when the user's config.toml was missing, so a snapshot copied by an earlier `container system start` kept applying after the user deleted their config. Unlink the snapshot in that case; a missing snapshot is not an error.
This branch has not been deployed
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.
Fixes #2516
Type of Change
Motivation and Context
Deleting
~/.config/container/config.tomlhad no effect, becausesystem startkept loading the copy it made earlier.If the user config is gone, the copy is now removed too, so the defaults apply. Nothing is lost: the copy is only ever written from the user config, on each start.
unlink(2)matches the existingrename(2)handling and doesn't follow a symlink.Testing
Added two tests: the stale copy is removed, and a symlink at the destination is removed without touching its target.
swift test --filter ConfigurationLoaderTestspasses. I also ran the issue's steps against this branch: after deleting the config and restarting, the snapshot is gone andcontainer system property lsno longer shows the domain.