Skip to content
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

Setup script not working for WSL2 #42

Closed
yorkshire-pudding opened this issue May 2, 2024 · 2 comments · Fixed by #43
Closed

Setup script not working for WSL2 #42

yorkshire-pudding opened this issue May 2, 2024 · 2 comments · Fixed by #43
Assignees

Comments

@yorkshire-pudding
Copy link

I had installed lando inside WSL2 (started on Ubuntu 18.04 LTS, currently on 20.04 LTS) and it works fine. I was wanting to upgrade from 3.20.8 within WSL2 but the script didn't work.

It fell over on this line:

arch="$(/usr/bin/uname -m)"

And failed the test for architecture.
As it couldn't find the directory (I checked and it doesn't exist).
I modified the script to use

arch="$(uname -m)"

And it then worked flawlessly.

The command arch also worked.

I don't know if that path was used for a reason rather than the command?

@pirog pirog self-assigned this May 3, 2024
@pirog
Copy link
Member

pirog commented May 3, 2024

i think generally the reason you do that is to ensure you are using a known quantity as opposed to whatever happens to be first in PATH which could hypothetically be exploited.

i think in this scenario its probably ok to fallback to using something in PATH though.

pirog added a commit that referenced this issue May 3, 2024
@pirog pirog linked a pull request May 3, 2024 that will close this issue
9 tasks
@yorkshire-pudding
Copy link
Author

Thanks for the explanation. In my machine, and I don't know how common it is, I found uname under /bin.

Wow - that was quick! PR looks good to me

@pirog pirog closed this as completed in #43 May 3, 2024
pirog added a commit that referenced this issue May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants