unrarall icon indicating copy to clipboard operation
unrarall copied to clipboard

[BASH 3] Relative path gives error message about UNRARALL_OUTPUT_DIR not being a directory

Open johanthoren opened this issue 6 years ago • 4 comments

Short description:

If using a relative path with the -o flag, unrarall complains that it's not a directory. When specifying the absolute path there is no error message.

How to reproduce:

Call on unrarall with the -o flag and give it a relative path as argument.

Example:

unrarall -o Movies Downloads

Sidenote:

[[ -d Movies ]] tests as True in the Shell.

Environment details:

OS: MacOS 10.13.3 Bash version: GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17)

johanthoren avatar Mar 07 '18 21:03 johanthoren

Thanks for letting us know, I'll mess with it in the morning but in the meantime can you try it out with a modern bash? Bash 4 has been out for nearly 10yrs!

On 7 Mar 2018 22:36, "Johan Thorén" [email protected] wrote:

Short description:

If using a relative path with the -o flag, unrarall complains that it's not a directory. When specifying the absolute path there is no error message. How to reproduce:

Call on unrarall with the -o flag and give it a relative path as argument. I.e unrarall -o Movies Downloads Sidenote:

[[ -d Movies ]] tests as True in the Shell. Environment details:

OS: MacOS 10.13.3 Bash version: GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/arfoll/unrarall/issues/44, or mute the thread https://github.com/notifications/unsubscribe-auth/AAfZZhu94yRbtywJPozQhsbiN5jBjCbJks5tcFLrgaJpZM4ShMmx .

arfoll avatar Mar 07 '18 23:03 arfoll

I just tested with bash 4 installed and then there is no more error message. It's definitely a bash 3 problem. Explains why I didn't notice it before I made a reinstall of MacOS, since I didn't yet install the bash 4 in my new environment.

johanthoren avatar Mar 08 '18 00:03 johanthoren

Maybe unrarall should test for the bash version and exit early if it's < 4?

if [ "${BASH_VERSINFO}" -lt 4 ]; then
  echo "$0 only supports bash 4 and higher releases. Please upgrade your version of bash"
  exit 1
fi

Afforess avatar Mar 11 '18 16:03 Afforess

Maybe, thing is without the output stuff it works nicely by default on mac so it's a shame to bork it for everyone :/

On 11 March 2018 at 17:52, Cameron McAvoy [email protected] wrote:

Maybe unrarall should test for the bash version and exit early if it's < 4?

if [ "${BASH_VERSINFO}" -lt 4 ]; then echo "$0 only supports bash 4 and higher releases. Please upgrade your version of bash" exit 1 fi

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/arfoll/unrarall/issues/44#issuecomment-372130161, or mute the thread https://github.com/notifications/unsubscribe-auth/AAfZZgvsIrs07HuXtVzTY59HYxKhIRmIks5tdVZkgaJpZM4ShMmx .

arfoll avatar Mar 11 '18 17:03 arfoll