atuin icon indicating copy to clipboard operation
atuin copied to clipboard

MSYS2 - Install script misplaces atuin binary

Open FrostKiwi opened this issue 1 year ago • 4 comments

In Windows 10 under MSYS2 and its MinGW64 environment, the install script https://github.com/ellie/atuin#script-recommended puts the cargo compiled atuin.exe in /c/Users/[name]/.cargo/bin, instead of a path that the PATH environment variable can see it. Initially, the install script is confused by the MSYS2 environment and detects replies with Unknown or unsupported OS, continuing with an install via cargo This leads to an additional manual copy of the atuin binary, that has to be performed by the user.

Otherwise atuin runs as expected.

FrostKiwi avatar May 08 '23 05:05 FrostKiwi

I don't know what should be installed if MinGW64/MSYS2 would be detected. But cargo should be fine. The install location would probably depend on where cargo was installed (in MSYS2/MinGW64 or in windows). I'll do some testing when I get the chance, but there might not be much we can do sadly.

YummyOreo avatar May 08 '23 13:05 YummyOreo

I don't know what should be installed if MinGW64/MSYS2 would be detected. But cargo should be fine. The install location would probably depend on where cargo was installed (in MSYS2/MinGW64 or in windows). I'll do some testing when I get the chance, but there might not be much we can do sadly.

Even if unfixed, it's not a big deal, just an extra copy.

Normally, the user directory is ~, which leads to the MSYS2 user directory. If MSYS2 was installed in C:\msys2\ this would lead to C:\msys2\home\{Windows User Name}\.cargo or /c/msys2/home/{Windows User Name}/.cargo with the CygWin path translation. So it's strange, that cargo put itself in the Windows user directory, instead of ~.

I just copied did cp /c/Users/{Windows User name}/.cargo/bin/atuin.exe /bin/atuin and everything worked flawlessly.

FrostKiwi avatar May 09 '23 04:05 FrostKiwi

@YummyOreo Here I recorded the installation procedure, including uname, cargo warning of the .cargo directory not being visible by PATH, my copy and the working end result.

https://user-images.githubusercontent.com/60887273/236998979-7d8e038b-80cc-48e2-be53-6b71d6e31762.mp4

FrostKiwi avatar May 09 '23 05:05 FrostKiwi

Sadly there is not really anything we can do about cargo putting it in the incorrect place.

An easy fix could be to add cargo's install path to PATH

YummyOreo avatar May 11 '23 20:05 YummyOreo