Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Flynn CLI instalation will fail on Linux and/or in fish (shell) #4325

Closed
Darkless012 opened this issue Feb 5, 2018 · 8 comments
Closed

Flynn CLI instalation will fail on Linux and/or in fish (shell) #4325

Darkless012 opened this issue Feb 5, 2018 · 8 comments

Comments

@Darkless012
Copy link

Example installation script will fail on Linux if the targeted directory is not writable to user.
(/usr/local/bin/ is owned by root and has drwxr-xr-x permissions)

see: https://flynn.io/docs/cli#installation

$ L=/usr/local/bin/flynn && curl -sSL -A "`uname -sp`" https://dl.flynn.io/cli | zcat >$L && chmod +x $L
bash: /usr/local/bin/flynn: Permission denied
curl: (23) Failed writing body (0 != 16384)

Second issue is with running this script in fish (or any other shell), since this command is using bash syntax.

Therefore I would like to suggest improved version of this "cli instalation command" in following form:

sudo bash -c 'L=/usr/local/bin/flynn && curl -sSL -A "`uname -sp`" https://dl.flynn.io/cli | zcat >$L && chmod +x $L'

This will start new bash as a superuser - which will solve both problems (access rights + bash syntax)

However I'm not sure how this command will work on MAC machine.

Also I wanted to make pull-request for the corresponding DOCs, but I couldn't find it in repo.
https://flynn.io/docs/cli#installation

@ndyakov
Copy link

ndyakov commented Feb 5, 2018

Hey, just tested this in macOS High Sierra with fish version 2.3.1. Works fine.

@titanous
Copy link
Contributor

titanous commented Feb 5, 2018

It also works fine on ZSH. Can you describe the shell issue you ran into?

@ndyakov
Copy link

ndyakov commented Feb 5, 2018

@titanous He probably meant that only L=/usr/local/bin/flynn && curl -sSL -A "`uname -sp`" https://dl.flynn.io/cli | zcat >$L && chmod +x $L won't work in fish or zsh

@titanous
Copy link
Contributor

titanous commented Feb 5, 2018

It definitely works fine with zsh.

@ndyakov
Copy link

ndyakov commented Feb 5, 2018

@titanous It does not in fish:

Unsupported use of '&&'. In fish, please use 'COMMAND; and COMMAND'.
fish: L=/usr/local/bin/flynn && curl -sSL -A "`uname -sp`" https://dl.flynn.io/cli | zcat >$L && chmod +x $L

@Darkless012 Darkless012 changed the title Flynn CLI instalation will fail on Linux and/or in fish/zsh shells Flynn CLI instalation will fail on Linux and/or in fish (shell) Feb 6, 2018
@Darkless012
Copy link
Author

@ndyakov @titanous Thanks for the tests :), I've updated the title.

Can you run the cli installation command without root elevation on Mac? If so, who is the owner and what are the rights on /usr/local/bin/ folder on Mac?

@ndyakov
Copy link

ndyakov commented Feb 6, 2018

@Darkless012 works without sudo, the logged in user is the owner (i guess if it's in the admin group) admin is the group of /usr/local/bin

@titanous
Copy link
Contributor

Flynn is unmaintained and our infrastructure will shut down on June 1, 2021. See the README for details.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants