alias can't find a file that actually exists

0

On my personnal computer, not a server, in my .bash_profile (I'm on OSX) — sym-linked to .bashrc, I have the following line among some others : alias deploy=sh ~/dir/ectory/deploy.sh

The file deploy.sh is chmoded 755, and I can finely execute it manually. But everytime I launch my terminal, I got this message :

-bash: alias: /Users/foo/dir/ectory/deploy.sh: not found

This path exists, the file too. I have other aliases which work.

Why is it throwing me this message?

ryancey

Posted 2014-04-16T15:30:49.223

Reputation: 143

Answers

0

You get that message because you didn't properly quote the space in your alias. Your alias should have the right side enclosed in quotes like this:

alias deploy='sh ~/dir/ectory/deploy.sh'

garyjohn

Posted 2014-04-16T15:30:49.223

Reputation: 29 085