-
-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error encountered when $HOME is not set #697
Comments
Just for the record: it's not Lima specific but more cloud-init in general, cloud-init startup script runs as root with no $HOME environment set up so this also effects running arkade during startup on cloud providers. |
I am thinking that pwd should be used when HOME isn't set. Temp could also be an option but we don't know how large it may be. Any concerns with going forward with that? |
When HOME is not available, installing packages with Another idea is to add a flag or env var to |
I'd agree with /usr/local/.arkade, purely on grounds of consistency; its fixed whereas Not so keen on the flag / env var options as this is adding something that the user needs to configure. There is little difference to advising a user to add |
Arkade installs to a temporary staging area of So I would expect Example in cloud-init:
Whilst we're exploring this, I'm not sure if I remember what
|
Writing to @Shikachuu could you move ahead with a solution where if "HOME" is not specified, then the current working folder is used as the base path instead? |
Presumably the script/user might also then call the binary that has just been downloaded. How does this work in situations where Feels like the user now has to know a little bit more about decisions in get.sh in order to get going, or what am I missing? |
Atleast the user will know where the binary is downloaded and we could put a notification there like:
or something like this. |
So in the script scenario the user writing the script needs to know ahead of time what decisions get.sh will take, or has to parse your output message in order to provide the base path to subsequent calls? I don’t know, maybe I’m not fully understanding the use case. |
Expected Behaviour
When run in an environment where the $HOME environment variable isnt set the requested action should complete successfully.
Current Behaviour
When run in an environment where the $HOME environment variable isnt set an error is encountered.
Issue was highlighted on faasd and triaged here
Are you a GitHub Sponsor yet (Yes/No?)
Possible Solution
@alexellis suggested that Arkade could avoid the error by choosing a default when $HOME isn't set.
Steps to Reproduce (for bugs)
unset HOME
arkade get --progress=false faas-cli
Context
Whilst it hasn't affected me directly it has been observed when Arkade is used in cloud-init scripts on Lima. This issue is to either track progress of a resolution, or to provide detail / trail for others encountering a similar issue.
If requesting a CLI for "arkade get"
N/A
Your Environment
0.8.26
The text was updated successfully, but these errors were encountered: