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

Fix cd behavior with absolute paths and home directory #692

Merged
merged 12 commits into from Jan 4, 2020

Conversation

mvz
Copy link
Contributor

@mvz mvz commented Jan 2, 2020

Summary

Correctly handle ~ and absolute paths in aruba.current_directory

Details

  • Limit the API of ArubaPath to just a few methods, so its main function is pushing and popping directories.
  • When converting ArubaPath to string, special case directories that are absolute paths or start with a ~.
  • Add specs for this behavior
  • Add scenario for cd-ing to the home directory

Motivation and Context

Fixes #418.

How Has This Been Tested?

Specs and a cucumber scenario were added.

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 not work as expected)
  • Refactoring (cleanup of codebase without changing any existing functionality)
  • Update documentation

Checklist:

  • I've added tests for my code
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@mvz mvz force-pushed the issue-418-fix-cd-behavior branch from 86de4cb to 88c53f8 Compare January 2, 2020 20:33
@mvz mvz force-pushed the issue-418-fix-cd-behavior branch from 88c53f8 to 875f643 Compare January 3, 2020 12:05
@mvz
Copy link
Contributor Author

mvz commented Jan 4, 2020

Merging this since the build errors are unrelated.

@mvz mvz merged commit 5f05c6e into master Jan 4, 2020
@mvz mvz deleted the issue-418-fix-cd-behavior branch January 4, 2020 07:44
@olleolleolle
Copy link
Contributor

This is super!

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.

Aruba fails to build proper path when ~ used as path to $HOME
2 participants