Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: Replace '$(pwd)' with '${PWD}' #192

Merged

Conversation

wking
Copy link
Member

@wking wking commented Aug 29, 2018

PWD is in POSIX, so there's no need to execute a pwd process to get this value. This fixes everthing found by:

$ git grep '\(pwd\)'

except for hack/*.sh, which is being addressed by #174.

@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 29, 2018
@wking wking force-pushed the pwd-process-to-env-var branch from 1c6deec to e9f768e Compare August 29, 2018 21:36
@@ -5,7 +5,7 @@ echo "Rendering Kubernetes core manifests..."

# shellcheck disable=SC2154
/usr/bin/docker run \
--volume "$(pwd)":/assets:z \
--volume "${PWD}:/assets:z" \
Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, this may not play well with template replacement (e.g. see the $$ further down).

PWD is in POSIX [1], so there's no need to execute a pwd process to
get this value.  This fixes everthing found by:

  $ git grep '\(pwd\)'

except for hack/*.sh, which is being addressed by [2].

I'm using $PWD instead of ${PWD} in the module files to avoid them
being interpolated [3] on template rendering [4].

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03
[2]: openshift#174
[3]: https://www.terraform.io/docs/configuration/interpolation.html
[4]: https://www.terraform.io/docs/providers/template/d/file.html
@wking wking force-pushed the pwd-process-to-env-var branch from e9f768e to a480782 Compare August 29, 2018 21:48
@wking
Copy link
Member Author

wking commented Aug 29, 2018

retest this please

@wking
Copy link
Member Author

wking commented Aug 30, 2018

The e2e-aws error was:

Waiting for API at https://ci-op-7fv5mcrg-68485-api.origin-ci-int-aws.dev.rhcloud.com:6443 to respond ...
Interrupted

/retest

@abhinavdahiya
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 30, 2018
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [abhinavdahiya,wking]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 8b785fe into openshift:master Aug 30, 2018
@wking wking deleted the pwd-process-to-env-var branch August 30, 2018 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants