Closed HackInTheBox closed 5 years ago
@HackInTheBox Thanks for the PR! Based on my own testing this looks like it does indeed fix spaces in the folder name. I noticed there are still issues if I try to actually use a script with spaces in the base filename and not just a folder. (e.g. "test spaces.sh") Also, I'd love to get test cases added for these scenarios as well. Nevertheless, seeing as this is an improvement over what is there currently I'm going to go ahead and merge it. Thanks again for the submission!
Thank YOU! Most of my afternoon was learning github frim (mostly) the command prompt😅 its my first github push / pull request and im having a great time with it. Im winding up with many “mini” functions that do just one thing but quickly building a little library of snippets.
Thank you for the inclusion. I never knew id have this much fun in bash as a result of switching to linux.
On Sat, May 25, 2019 at 10:36 PM ahnick notifications@github.com wrote:
@HackInTheBox https://github.com/HackInTheBox Thanks for the PR! Based on my own testing this looks like it does indeed fix spaces in the folder name. I noticed there are still issues if I try to actually use a script with spaces in the base filename and not just a folder. (e.g. "test spaces.sh") Also, I'd love to get test cases added for these scenarios as well. Nevertheless, seeing as this is an improvement over what is there currently I'm going to go ahead and merge it. Thanks again for the submission!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ahnick/encpass.sh/pull/11?email_source=notifications&email_token=AMDP6QPTH62CB2Y25WGKA3TPXHZTHA5CNFSM4HPVBOH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWH4ZKA#issuecomment-495963304, or mute the thread https://github.com/notifications/unsubscribe-auth/AMDP6QOFENTMIUMQ36IDJZDPXHZTHANCNFSM4HPVBOHQ .
I kept getting a
syntax error near unexpected token
error when running the script. I realized that a space in a folder name was responsible for the error while debugging and was able to solve it by adding double quotes to the$0
variable for thebasename
argument. Works great now and has a little more compatibility. Lines 50 and 53 now readLABEL=$(basename "$0")