Conversation
glennmusa
suggested changes
May 7, 2021
glennmusa
reviewed
May 10, 2021
| echo "INFO: cleaning up MLZ resources with tag 'DeploymentName=${mlz_env_name}'..." | ||
| . "${this_script_path}/scripts/config/config_clean.sh" "${mlz_config_file}" | ||
| # clean up reources that was created by deploy.sh | ||
| rm -rf "${configuration_output_path}/${mlz_env_name}.mlzconfig" "${configuration_output_path:?}/${tfvars_filename}" |
Contributor
There was a problem hiding this comment.
Do we need the unset validator :?? I want to say set -e should throw on a bad reference/path.
Suggested change
| rm -rf "${configuration_output_path}/${mlz_env_name}.mlzconfig" "${configuration_output_path:?}/${tfvars_filename}" | |
| rm -rf "${configuration_output_path}/${mlz_env_name}.mlzconfig" "${configuration_output_path}/${tfvars_filename}" |
Contributor
Author
There was a problem hiding this comment.
I'm okay with removing it. This is the output from running shellcheck.
$ shellcheck src/clean.sh
In src/clean.sh line 102:
rm -rf "${configuration_output_path}/${mlz_env_name}.mlzconfig" "${configuration_output_path}/${tfvars_filename}"
^-- SC2115: Use "${var:?}" to ensure this never expands to / .
.... So I added ':?' to resolve it.
Contributor
There was a problem hiding this comment.
That makes sense. Thanks for sharing!
glennmusa
approved these changes
May 10, 2021
| echo "INFO: cleaning up MLZ resources with tag 'DeploymentName=${mlz_env_name}'..." | ||
| . "${this_script_path}/scripts/config/config_clean.sh" "${mlz_config_file}" | ||
| # clean up reources that was created by deploy.sh | ||
| rm -rf "${configuration_output_path}/${mlz_env_name}.mlzconfig" "${configuration_output_path:?}/${tfvars_filename}" |
Contributor
There was a problem hiding this comment.
That makes sense. Thanks for sharing!
Adding the word INFO for consistency. Co-authored-by: Glenn Musa <4622125+glennmusa@users.noreply.github.com>
jwaltireland
pushed a commit
to ARPA-H/AzureMissionLZ
that referenced
this pull request
Nov 14, 2024
* cleanup files created by deploy.sh Azure#192 * removing all components .tfvars files * used explicit tiers instead of '*' * added function to delete files in dir by name * changed order file deletes * Update src/clean.sh Adding the word INFO for consistency. Co-authored-by: Glenn Musa <4622125+glennmusa@users.noreply.github.com> Co-authored-by: jjansen23 <jerome@DESKTOP-IMETN7E.localdomain> Co-authored-by: Glenn Musa <4622125+glennmusa@users.noreply.github.com>
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.
Description
Deleted the .mlzconfig and the .tfvars that was created by deploy.sh
Issue reference
The issue this PR will close: #192
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:
shellcheck.vscode/extensions.json.)