fix: set the exit code to the return of cd for the warp function#143
Merged
alpha-tango-kilo merged 2 commits intomfaerevaag:masterfrom Nov 17, 2024
Merged
fix: set the exit code to the return of cd for the warp function#143alpha-tango-kilo merged 2 commits intomfaerevaag:masterfrom
alpha-tango-kilo merged 2 commits intomfaerevaag:masterfrom
Conversation
zimeg
commented
Nov 3, 2024
Contributor
Author
zimeg
left a comment
There was a problem hiding this comment.
📝 Leaving a few comments on changes from commits in another PR, but needed for the test_config test to pass with the changed source in tests!
alpha-tango-kilo
approved these changes
Nov 5, 2024
edfcd38 to
6054abe
Compare
zimeg
commented
Nov 17, 2024
Contributor
Author
zimeg
left a comment
There was a problem hiding this comment.
@alpha-tango-kilo I just rebased it with the changes in #141 since these share a few testing changes needed for sourcing with WD_CONFIG 😅
Thanks once more for the review, and please let me know if more updates are needed! 🙏 ✨
Comment on lines
+536
to
+542
| # confirm $WD_CONFIG was unchanged | ||
| assertEquals "$wd_config_lines" "$(total_wps)" | ||
| assertEquals "$wd_config_lines" 0 | ||
|
|
||
| # confirm --config was changed | ||
| assertEquals 1 "$(wcl < "$arg_config")" | ||
| assertEquals 1 "$(WD_CONFIG=$arg_config total_wps)" |
Contributor
Author
There was a problem hiding this comment.
No changes to the asserts in this PR or the linked, but it's added for clarity as part of #141 🔬
6054abe to
8eba879
Compare
alpha-tango-kilo
approved these changes
Nov 17, 2024
Collaborator
alpha-tango-kilo
left a comment
There was a problem hiding this comment.
Awesome, thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
👋 🤠 This PR updates the exit code with the returned value from
cdin thewd_warpfunction to fix #142 and break chained commands if nested directories don't exist.Preview
With this change the exit code is set to
1when a missing nested warp point is provided:Chained commands also break once the missing nested warp point is reached:
$ wd home unknown && ./setup.sh wd_warp:cd:19: no such file or directory: /home/user/unknownReviewers
To test the changes with this branch checked out, the following commands might be useful ✨
Notes
This change includes extra commits from #140 for some of the changes to testing. Please let me know if a rebase or other reverts are needed, or another change!