I have a problem where I can't do my
vagrant up in cygwin, because cygwin can't understand non-POSIX style paths like
C:\, which the vagrantfile uses.
git-bash to start vagrant, because it can understand the non-POSIX paths. To make my life even simpler, I created windows
.lnk files to launch bash scripts in git-bash that start my ssh agent and start vagrant.
I wanted it to take a step further and use bash aliases in cygwin to create an alias for
vagrant up that would launch my
vagrant-up.lnk, etc, which in turn would launch a git-bash session and finally start my vagrant instance.
However, I am having a strange problem where I cannot launch
.lnk files with cygwin nor git-bash.
~/Desktop $ cygstart vagrant-up.lnk Unable to start 'vagrant-up.lnk': The specified path was not found.
Thinking it was a path issue, I tried giving the full path:
~/Desktop $ cygstart -o /cygdrive/c/Documents\ and\ Settings/user/Desktop/vagrant-up.lnk Unable to start 'C:\Documents and Settings\user\Desktop\vagrant-up.lnk': The operating system denied access to the specified file.
The error message seems more useful in git-bash
MINGW64 /c/Users/user/Desktop $ ./vagrant-up.lnk bash: ./vagrant-up.lnk: cannot execute binary file: Exec format error
I googled the "bash cannot execute binary file" error, but only found results about *nix utilities compiled for the wrong architecture (e.g. AIX on x86, etc)
On Timothy Martin's suggestion, I also tried this, to no avail:
$ cygstart /cygdrive/c/Users/user/Desktop/vagrant-up.lnk Unable to start 'C:\Users\user\Desktop\vagrant-up.lnk': The specified path was not found.
It is interesting that it uses windows-style paths in this error message, but I don't know how to turn that fact into a resolution of my problem.
"C:\Program Files\Git\git-bash.exe" -l "C:\cygwin\home\user\vagrant\scripts\vagrant-up.git-bash" and
Start in: is in
What do I need to do to launch these
.lnk files from cygwin? They run just fine when I double-click them in Windows.