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

chmod flags not compatible with mac? #50

Open
klokie opened this issue May 15, 2023 · 4 comments
Open

chmod flags not compatible with mac? #50

klokie opened this issue May 15, 2023 · 4 comments

Comments

@klokie
Copy link

klokie commented May 15, 2023

Hi, I'm trying to get this working on a Mac M1 running Mac OS Ventura (13.3.1). I've got Homebrew and used it to install both this script and bash 5.2.15.

The script exits after the "Enter Client ID" step, with the error "chmod: --: No such file or directory". I wasn't familiar with the double dash -- syntax, maybe it's not supported by the chmod provided by MacOS?

@jaysoffian
Copy link

jaysoffian commented Jun 1, 2023

Yup, same for FreeBSD. The script does this in case the filename starts with a - to prevent chmod interpreting as an option. A portable way to do this would be to prefix filenames that start with a - with ./.

I don't know why the script is chmod'ing files in the first place. It should just set a umask or fall back to the umask it inherits from the environment.

@klokie
Copy link
Author

klokie commented Jun 1, 2023

A portable way to do this would be to prefix filenames that start with a - with ./.

I tried that, but the script still exited. The only way I could get it to run was by removing all calls to chmod; then it worked ok.

@Akianonymus
Copy link
Owner

Hmm, i will try to fix.

@jaysoffian
Copy link

A portable way to do this would be to prefix filenames that start with a - with ./.

I tried that, but the script still exited. The only way I could get it to run was by removing all calls to chmod; then it worked ok.

I didn't mean for you to prefix filenames. I meant that the script would need to be updated to remove -- and use ./$filename instead in cases where $filename does not start with /. The reason the -- was put into the script was in case a filename starts with a - to prevent chmod from interpreting it as an option.

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

No branches or pull requests

3 participants