tursodatabase / turso-install

Turso CLI installer
https://turso.tech
MIT License
1 stars 5 forks source link

Move install directory to end of PATH #16

Closed redhotvengeance closed 2 months ago

redhotvengeance commented 2 months ago

For some dev environments, both turso and sqld may be installed/managed by another package manager (like Nix). In these cases, having ~/.turso at the front of the PATH will cause certain commands to fail. For instance, since the Turso install script also automatically installs sqld in ~/.turso, running turso dev will attempt to use ~/.turso/sqld instead of the sqld that is installed via the package manager. In environments like NixOS, this will completely break turso dev because the automatically installed sqld binary cannot run on NixOS, and since it exists earlier in the PATH it supercedes the properly installed sqld Nix package.

This patch tweaks the PATH modification so that the ~/.turso folder is placed at the end of the existing PATH, preventing it from overriding any other installed/managed versions of turso or sqld.