Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@rosshadden
Copy link
Contributor

Impact: major
Type: bugfix

Issue

The general problem is that the find used in bin/setup is run from the PWD the script is run from.
The expected outcome is that bin/setup should only copy environment variables found within this project.

Right now running make init in reaction-platform copies the environment variables from every project's .env.example files into almost every .env file of every other project.
This is because in this case the find command used to find all .env.example files is being run from the platform directory, and thus all cloned projects within it are found by the find.

Solution

I made bin/setup cd to the root of the project before running the find.
This also prevents us from needing the $__dir variable we were using when referring to files within the script.

Testing

  1. Run bin/setup from the root of this project (which is the only place it used to work from).
  2. Run bin/setup from any other folder, such as reaction-platform or a folder that contains other reaction projects.

For both of these cases, verify that your working directory does not change. It shouldn't, because the cd happens within a function and is not expected to affect your shell directory.

@rosshadden rosshadden requested a review from focusaurus December 4, 2019 22:07
fix: upgrade handlebars version
Signed-off-by: Ross Hadden <[email protected]>
@focusaurus
Copy link
Contributor

The diff doesn't match the description on this PR. What's going on here?

@rosshadden rosshadden changed the base branch from master to develop December 4, 2019 22:23
@rosshadden rosshadden changed the title Fix bin setup fix: made bin/setup always run from the desired path Dec 4, 2019
@rosshadden
Copy link
Contributor Author

There was a branch mixup. All better now.

@rosshadden rosshadden merged commit b309e37 into develop Dec 4, 2019
@rosshadden rosshadden deleted the fix-bin-setup branch December 4, 2019 23:06
@rosshadden
Copy link
Contributor Author

Cherry-picked into the release-3.0.0 branch as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants