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

use absolute paths instead of changing directory #1822

Merged

Conversation

cornfeedhobo
Copy link
Member

@cornfeedhobo cornfeedhobo commented Jan 31, 2021

Description

This PR stops changing directories while reloading, which I'm calling a bug because it is completely different from my expectations and caused a lot of debugging confusion. I'm also labeling this as help-wanted because I'd like some people to test this manually since we don't really have integration tests yet, but I'm feeling pretty good about it.

Motivation and Context

While playing around with the *env plugins, I discovered that if I started a fresh shell from a directory with a .*-version file, the tools were still unable to figure out the set version, because we are changing the working directory while loading.

How Has This Been Tested?

locally and with bats

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • If my change requires a change to the documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • If I have added a new file, I also added it to clean_files.txt and formatted it using lint_clean_files.sh.
  • I have added tests to cover my changes, and all the new and existing tests pass.

@cornfeedhobo
Copy link
Member Author

_bash-it-reload also has some pushd/popd usage that I'd love to get rid of. I've tested it locally and can include it in this PR, or break it up. Let me know.

Copy link
Member

@NoahGorny NoahGorny left a comment

Choose a reason for hiding this comment

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

LGTM
@cornfeedhobo well done! you can create a followup PR for bash-it-reload 😄

@cornfeedhobo cornfeedhobo merged commit ff2f961 into Bash-it:master Feb 3, 2021
@cornfeedhobo cornfeedhobo deleted the stop-changing-working-directory branch February 3, 2021 19:14
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.

None yet

2 participants