This repository has been archived by the owner on May 26, 2023. It is now read-only.
fix(snap): fix initial configuration file install #368
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.
Signed-off-by: Tony Espy espy@canonical.com
PR Checklist
Please check if your PR fulfills the following requirements:
If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-cli/blob/master/.github/Contributing.md.
What is the current behavior?
After installing the snap, the first time edgex-cli is run, it will fail due to the client looking for
sample-configuration.toml
via a relative path. I missed this while testing because I built the snap and installed it from the root directory of the git repository, from which the relative path works.Issue Number:
What is the new behavior?
Whenever the client is run via the snap, a wrapper script checks for existence of
configuration.toml
, and it not found, will use thesample-configuration.toml
to initialize it. The wrapper will also display a message that says theconfiguration.toml
file has been initialized and display it's full pathname (/home/<user>/snap/edge-cli/current/.edgex-cli/configuration.toml
).Does this PR introduce a breaking change?
New Imports
Specific Instructions
Are there any specific instructions or things that should be known prior to reviewing?
No
Other information