Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.

Fix a condition #145

Merged
merged 1 commit into from
Feb 25, 2020
Merged

Fix a condition #145

merged 1 commit into from
Feb 25, 2020

Conversation

alexjurkiewicz
Copy link
Contributor

The old behaviour didn't cause issues, because setting a working dir of
"" is equivalent to setting ".". But better to fix this behaviour.

The old behaviour didn't cause issues, because setting a working dir of
"" is equivalent to setting ".". But better to fix this behaviour.
@@ -33,7 +33,7 @@ function parseInputs {

# Optional inputs
tfWorkingDir="."
if [ "${INPUT_TF_ACTIONS_WORKING_DIR}" != "" ] || [ "${INPUT_TF_ACTIONS_WORKING_DIR}" != "." ]; then
if [[ -n "${INPUT_TF_ACTIONS_WORKING_DIR}" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if [[ -n "${INPUT_TF_ACTIONS_WORKING_DIR}" ]]; then
if [ -n "${INPUT_TF_ACTIONS_WORKING_DIR}" ]; then

@alexjurkiewicz
Copy link
Contributor Author

alexjurkiewicz commented Feb 25, 2020 via email

@sudomateo
Copy link
Contributor

@alexjurkiewicz I'm not sure I agree with that statement. Especially since the INPUT_TF_ACTIONS_WORKING_DIR defaults to .. However, since there are a few different uses of if with single brackets and double brackets, I'll allow it.

@sudomateo sudomateo merged commit cd8167c into hashicorp:master Feb 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants