denisidoro / navi

An interactive cheatsheet tool for the command-line
Apache License 2.0
14.63k stars 491 forks source link

Detecting architecture when running in a dev container #850

Open mw-stanley opened 11 months ago

mw-stanley commented 11 months ago

Describe the bug I'm running Navi in a dev container - from what I have seen, this requires navi to be installed for the host architecture rather than the container VM's architecture. When running VSCode on an M1 mac, the host architecture is arm64 but navi is installed for the aarch64 architecture as this is what's returned by the VM on uname -m. This results in navi not working.

I'm not sure if this is the result of an improper dev container setup on my side or if it's something that could be resolved by forcing navi to be installed for a certain architecture, perhaps by having an override flag in the install script?

To Reproduce

  1. Run the install script on a linux dev container running on an M1 Mac
  2. Attempt to run navi --version or any other command -> causes segfault

Expected behavior Navi can be force installed for the $BUILDARCH when Docker builds the dev container, rather than for the VM architecture.

welcome[bot] commented 11 months ago

Thanks for opening your first issue here! In case you're facing a bug, please update navi to the latest version first. Maybe the bug is already solved! :)