-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bootstrap): prompt for env tokens (#114)
* feat(bootstrap): prompt user for empty values in `.env` file
- Loading branch information
Showing
7 changed files
with
186 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
31 changes: 31 additions & 0 deletions
31
...trap/test_bootstrap_env.test_bootstrap_env_dotenv_different_prompt_scenarios.approved.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
DEBUG: {current_working_directory}/.env doesn't exist yet | ||
DEBUG: {current_working_directory}/.env.template exists | ||
Copying {current_working_directory}/.env.template to {current_working_directory}/.env and prompting for empty values | ||
# comment for token 2 - you should enter a valid value | ||
# another comment | ||
|
||
DEBUG: {selector} | ||
|
||
|
||
# another comment | ||
|
||
|
||
---- | ||
.env: | ||
---- | ||
|
||
TOKEN_1=123 | ||
|
||
# comment for token 2 - you should enter a valid value | ||
# another comment | ||
TOKEN_2_WITH_MULTI_LINES_COMMENT=test value for TOKEN_2_WITH_MULTI_LINES_COMMENT | ||
TOKEN_3=test value | ||
|
||
TOKEN_4_WITH_SPACES=test value for TOKEN_4_WITH_SPACES | ||
TOKEN_5_WITHOUT_COMMENT=test value for TOKEN_5_WITHOUT_COMMENT | ||
TOKEN_WITH_NO_EQUALS_SIGN | ||
# another comment | ||
TOKEN_6_EMPTY_WITH_COMMENT=test value for TOKEN_6_EMPTY_WITH_COMMENT | ||
TOKEN_7_VALUE_WILL_BE_EMPTY= | ||
TOKEN_8 = value with spaces | ||
TOKEN_8_SPECIAL_CHAR=* |
2 changes: 1 addition & 1 deletion
2
...otstrap/test_bootstrap_env.test_bootstrap_env_dotenv_missing_template_exists.approved.txt
This file contains 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
16 changes: 16 additions & 0 deletions
16
tests/bootstrap/test_bootstrap_env.test_bootstrap_env_dotenv_with_values.approved.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
DEBUG: {current_working_directory}/.env doesn't exist yet | ||
DEBUG: {current_working_directory}/.env.template exists | ||
Copying {current_working_directory}/.env.template to {current_working_directory}/.env and prompting for empty values | ||
---- | ||
.env: | ||
---- | ||
|
||
TOKEN_1=123 | ||
# comment for token 2 - you should enter a valid value | ||
# another comment | ||
TOKEN_2_WITH_MULTI_LINES_COMMENT=test | ||
TOKEN_3=test value with spaces | ||
|
||
TOKEN_4_WITH_NO_EQUALS_SIGN | ||
# another comment | ||
TOKEN_5_SPECIAL_CHAR=* |
a6fe18f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report