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

Do not replace entire environment inside cd block #604

Merged
merged 2 commits into from
Mar 17, 2019
Merged

Conversation

mvz
Copy link
Contributor

@mvz mvz commented Mar 17, 2019

Summary

Backport fix for cd behavior.

Details

Test and fix the the setting of environment variables inside the block passed to cd. Backport of cbbefda, which was part of #442.

Motivation and Context

The #cd method would clear the entire environment within the block, instead of just updating it. This is clearly not the intended behavior, since even variables set with set_environment_variable are ignored. This also makes #cd a bad substitute for the deprecated #in_current_directory method.

How Has This Been Tested?

Specs were added.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I've added tests for my code

@mvz mvz merged commit 8355549 into still Mar 17, 2019
@mvz mvz deleted the fix-cd-environment branch March 17, 2019 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants