fsprojects / FAKE

FAKE - F# Make

Home Page:https://fake.build

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code should search for sqlpackage in $PATH on Unix-like OSs

nick-gravgaard opened this issue · comments

Currently the path for sqlpackage is hard-coded as /usr/local/bin/sqlpackage if the user is using MacOS, Linux or other Unix-like operating systems. This works for MacOS, but results in the error No SqlPackage.exe filename was given. on my Arch based Linux system. On my system it's located at /usr/bin/sqlpackage as you can see in this terminal session:

$ which sqlpackage
/usr/bin/sqlpackage

$ pacman -Qo /usr/bin/sqlpackage                     
/usr/bin/sqlpackage is owned by sqlpackage 19.0-1

$ /usr/local/bin/sqlpackage
zsh: no such file or directory: /usr/local/bin/sqlpackage

I think a colleague also has the same problem on his Ubuntu system. I don't think we should hard-code a different path for Linux systems though, as different distributions and package maintainers can have different ideas about where binaries should live. Instead, the canonical Unix practice is to search the directories specified by the PATH environment variable. I've made a PR which does that here: #2700

Welcome to the FAKE community! Thank you so much for creating your first issue and therefore improving the project!

released in 5.23.1