This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
CLI: read config file from env location (Issue #189) #190
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.
This PR fixes the bug described in issue #189.
Problem
The issue occurs then the user runs a Canopy CLI command (such as
new
,upsert
) and does not specify the-c
parameter with a config file lcoation.The current behaviour is to default to an empty (default) configuration while the user might expect Canopy to read the config file location specified in the environment variable
CANOPY_CONFIG_FILE
.Solution
This change updates the way the config file is loaded by the Canopy CLI. When the config file location is not specified through the
-c
parameter, we use the file location specified in the environment variable CANOPY_COPY_FILE.Type of Change
Test Plan
Only manual testing was done for this change.