Home > other >  MSYS2: After integrating Git-For-Windows, I'm getting this error at MSYS2 startup: bash: create
MSYS2: After integrating Git-For-Windows, I'm getting this error at MSYS2 startup: bash: create

Time:03-07

I installed msys2, and then integrated the installation of Git-For-Windows within that msys2 environment, by applying this simple procedure.

After doing so, I'm getting this error when I double-click the msys2 desktop icon:

bash: create-shortcut.exe: command not found
bash: create-shortcut.exe: command not found

jdoe@msys2$

I can see where the above error originates :

The aforementioned procedure created this new script - /etc/profile.d/git-sdk.sh - which attempts to run the create-shortcut.exe command; but (like the script) I can't find where create-shortcut.exe is.

Does anyone know where that create-shortcut.exe comes from (MSYS2, MS-WINDOWS), or where it might be located? Or perhaps even know what the fix for this is? =:)

Thank you in advance.

CodePudding user response:

Thank you to the commenters.

It's a bug, either because the referenced command wasn't included in the package, or because the command is not in the script's PATH. I'll file an issue in the GitHub project for it.

Thank you particularly to @HolyBlackCat for pointing out that the procedure wasn't necessary since git(1) is already available in MSYS2s default repositories. (I'm new to MSYS2 because I was provided a Windows environment instead of Linux). So, I ended up backing out the procedure and installing the native repository version instead, which works well.

However, if you did want to keep the version provided by the procedure -- because it does, indeed, offer more than just the git(1) command (e.g., it has an SDK too) -- then you can simply locate and safely comment-out the offending section in the /etc/profile.d/git-sdk.sh RC script, whose only purpose is to create a Windows desktop icon. Hopefully this helps others.

  • Related