fn
fn copied to clipboard
Install path of fn executable is not valid on CentOS
Current script assumes that /usr/local/bin
is in PATH
then the installation fails on CentOS 7 because it is not in the default PATH.
This was discussed also in #973 and can be fixed adding it to the PATH if not present yet.
thanks for catching this. I'm uncertain about proceeding, for a couple of reasons:
- this doesn't fix #973 - installing to $HOME may fix that (though certainly some things don't allow writing to $HOME either, maybe we can't win here 100% but we might get better coverage than /usr/local/bin)
- running the docker image of centos7 (which is maybe not the perfect representation of a centos installation, nonetheless...) shows that /usr/local/bin exists in the default path, and am a little uneasy about https://github.com/fnproject/cli/pull/531 to modify user paths. see:
✗: docker run centos:7 sh -c 'echo $PATH'
Unable to find image 'centos:7' locally
7: Pulling from library/centos
Digest: sha256:184e5f35598e333bfa7de10d8fb1cebb5ee4df5bc0f970bf2b1e7c7345136426
Status: Downloaded newer image for centos:7
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
i'm inclined to install to home as a fix for this, as it'll pick up some of the issues from #973 as well. any thoughts?
Hello, I was trying out it on latest CentOS 7 Cloud image available from: https://docs.cloud.oracle.com/iaas/images/image/25384cd8-6314-4acf-abc0-1fcebb875a9a/
and from root user, /usr/local/bin was not in the PATH, that's why I put that check. On a general distribution CentOS 7 ISO, I found it in root $PATH, so it may depend on the image version.
I agree btw that it should use /usr/local/bin
for privileged installation of non-packaged software and $HOME for all other ones, maybe a check if id -u
for the former, else $HOME