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

macOS: readlink: illegal option -- e #74

Closed
rliljest opened this issue Apr 3, 2019 · 2 comments · Fixed by #95
Closed

macOS: readlink: illegal option -- e #74

rliljest opened this issue Apr 3, 2019 · 2 comments · Fixed by #95
Labels
Milestone

Comments

@rliljest
Copy link

rliljest commented Apr 3, 2019

The version of readlink installed on macOS does not support the -e flag, so there's a lot of noise when running argbash commands. Most of the time this noise is just when using argbash on a script, but it can happen in the generated script too when the ARG_USE_PROG template is used.

% argbash -o output.sh simple.sh
readlink: illegal option -- e
usage: readlink [-n] [file ...]
/usr/local/bin/argbash: line 450: -2: substring expression < 0
readlink: illegal option -- e
usage: readlink [-n] [file ...]
The --library option is deprecated, use --strip user-content next time
The output can't be blank - it is not a legal filename!

On a mac you can install a version of readlink that argbash expects: Using homebrew, brew install coreutils will install greadlink which supports the -e flag.

So one potential solution would be for argbash itself to use ARG_USE_PROG to allow us to specify readlink exe to use, and on a mac setting that to greadlink would remove the noise

@gdevenyi
Copy link

gdevenyi commented Apr 3, 2019

Alternatively:
https://gist.github.com/esycat/5279354

@matejak
Copy link
Owner

matejak commented Apr 11, 2019

This whole readlink thing is a pain. I am thinking of turning it off by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants