Fix installRoot config path in ConfigurationLoader load() docstring.#1897
Open
anxkhn wants to merge 1 commit into
Open
Fix installRoot config path in ConfigurationLoader load() docstring.#1897anxkhn wants to merge 1 commit into
anxkhn wants to merge 1 commit into
Conversation
The load() docstring described the default system config layer as <installRoot>/etc/container/config/config.toml, but the path builder returns <installRoot>/etc/container/config.toml: the .installRoot case in configurationFile(in:of:) appends only "etc/container" and the config filename, without the "config" directory that .appRoot uses. The spurious segment also contradicted the sibling configurationFile(in:of:) docstring, which already documents .installRoot as <base>/etc/container/config.toml. Drop the extra /config/ segment so the docstring matches the code.
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.
Type of Change
Motivation and Context
The
load()docstring inSources/ContainerPersistence/ConfigurationLoader.swiftdescribed the default system config layer as
<installRoot>/etc/container/config/config.toml, but the code produces<installRoot>/etc/container/config.toml.The path builder
configurationFile(in:of:)only inserts theconfigdirectoryfor the
.appRootcase; the.installRootcase appendsetc/containerand theconfig filename directly:
The extra
/config/segment was also self-contradictory: the siblingconfigurationFile(in:of:)docstring in the same file already documents.installRootas<base>/etc/container/config.toml(with the example/usr/local/etc/container/config.toml).This drops the spurious
/config/segment so theload()docstring matches boththe code and the sibling docstring. The
<appRoot>/config/config.tomlhalf of thesame line is correct and is left unchanged.
Testing
Docstring-only change, so no unit test applies. Verified with:
swift format lint --stricton the file: clean.swift build --target ContainerPersistence: builds.Diff (+1/-1):
/// Providers are consulted in the order given — values from earlier files override /// later ones. The default order is user config (`<appRoot>/config/config.toml`) - /// > system config (`<installRoot>/etc/container/config/config.toml`). + /// > system config (`<installRoot>/etc/container/config.toml`).