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

Add inherit environment vars from parent shell #106

Merged
merged 17 commits into from
Oct 22, 2019

Conversation

SimonBaeumer
Copy link
Member

@SimonBaeumer SimonBaeumer commented Oct 19, 2019

Fixes #94
Fixes #98
Fixes #104
Fixes #97
Fixes #92

This pull-requests allows to inherit all env variables from your parent shell.

conf:
  inherit-env: true
  env:
    PATH: "/home/user/bin/" # You can still overwrite the inherited variables

Checklist

  • Added unit / integration tests for windows, macOS and Linux?
  • Added a changelog entry in CHANGELOG.md?
  • Updated the documentation (README.md, docs)?
  • Does your change work on Linux, Windows and macOS?

@SimonBaeumer SimonBaeumer added this to the v1.3.0 milestone Oct 19, 2019
@SimonBaeumer SimonBaeumer changed the title WIP: Remove cmd pkg and use SimonBaeumer/cmd WIP: Add inherit environment vars from parent shell Oct 19, 2019
@SimonBaeumer SimonBaeumer force-pushed the inhereit-from-parent-env branch from 3451693 to f78d004 Compare October 19, 2019 17:24
The test "it should inherit from parent env" could not find the $USER
env variable because commander resettet them in the parent test suite.
@SimonBaeumer SimonBaeumer force-pushed the inhereit-from-parent-env branch from 164df1d to 3585627 Compare October 19, 2019 20:39
@SimonBaeumer SimonBaeumer force-pushed the inhereit-from-parent-env branch 4 times, most recently from b2a1ab0 to caaff46 Compare October 19, 2019 20:57
@SimonBaeumer SimonBaeumer force-pushed the inhereit-from-parent-env branch from caaff46 to 1562f83 Compare October 19, 2019 21:05
This is neccessary because windows uses %VAR% for env variable
expansions, on the other side linux and darwin both are using the unix
standard which uses $VAR.
@SimonBaeumer SimonBaeumer force-pushed the inhereit-from-parent-env branch 2 times, most recently from 5e109e8 to 8f831a8 Compare October 22, 2019 11:26
@SimonBaeumer SimonBaeumer force-pushed the inhereit-from-parent-env branch from 8f831a8 to 70b81d5 Compare October 22, 2019 11:26
@codeclimate
Copy link

codeclimate bot commented Oct 22, 2019

Code Climate has analyzed commit 70b81d5 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 97.5% (50% is the threshold).

This pull request will bring the total coverage in the repository to 95.9% (2.6% change).

View more on Code Climate.

@SimonBaeumer SimonBaeumer changed the title WIP: Add inherit environment vars from parent shell Add inherit environment vars from parent shell Oct 22, 2019
@SimonBaeumer SimonBaeumer merged commit 152d558 into master Oct 22, 2019
@SimonBaeumer SimonBaeumer deleted the inhereit-from-parent-env branch February 11, 2020 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants