guarinogabriel / Mac-CLI

 macOS command line tool for developers – The ultimate tool to manage your Mac. It provides a huge set of command line commands that automatize the usage of your Mac.
MIT License
8.86k stars 333 forks source link

Bad interpreter #123

Closed ghost closed 2 years ago

ghost commented 7 years ago

Running mac help I get following error:

/usr/local/bin/mac: /bin/sh^M: bad interpreter: No such file or directory

Confirmed with cd /usr/local/bin/mac – Mac-CLI doesn't create the directory. And /bin/sh^M looks like an python script error. Just installed newest node and npm versions using Homebrew.

python --version Python 2.7.13 pip --version pip 9.0.1 from /usr/local/lib/python2.7/site-packages (python 2.7)

I have latest MacOS Sierra and tried both installation methods. Fast-CLI installation seems to fail since it is not reachable with fast. But Glances works.

wingland commented 7 years ago

I met with the same issue. I did not install any optional tools.

The error seems to be caused by the file line break format. I used dos2unix to convert, but met with more errors below:

$ mac
: command not foundcli/misc/help: line 2: 
: command not foundcli/misc/help: line 6: 
: command not foundcli/misc/help: line 23: 
'usr/local/bin/mac-cli/misc/help: line 24: syntax error near unexpected token `
'usr/local/bin/mac-cli/misc/help: line 24: `function printInfo()
: command not foundcli/plugins/brew: line 2: 
: command not foundcli/plugins/brew: line 6: 
/usr/local/bin/mac-cli/plugins/brew: line 7: syntax error near unexpected token 'in
'usr/local/bin/mac-cli/plugins/brew: line 7: `case "$fn" in
: command not foundcli/plugins/general: line 2: 
: command not foundcli/plugins/general: line 6: 
: command not foundcli/plugins/general: line 8: 
: command not foundcli/plugins/general: line 12: 
stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.