thoughtworks / talisman

Using a pre-commit hook, Talisman validates the outgoing changeset for things that look suspicious — such as tokens, passwords, and private keys.
https://thoughtworks.github.io/talisman/
MIT License
1.87k stars 241 forks source link

Install failure: aarch64 not recognized as equivalent to arm64 #438

Closed bschofield-va closed 5 months ago

bschofield-va commented 8 months ago

Describe the bug

Talisman fails to install on some Linux 64 ARM systems, such as Ubuntu Jammy that reports as aarch64 (but it's easily fixed)

$ bash -c "$(curl --silent https://thoughtworks.github.io/talisman/scripts/install.bash)"
Talisman currently only supports x86 and x86_64 and arm64 architectures.
If this is a problem for you, please open an issue: https://github.com/thoughtworks/talisman/issues/new

$ uname -a
Linux fresnel 6.4.16-linuxkit #1 SMP PREEMPT Wed Oct 25 16:32:24 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

To Reproduce Steps to reproduce the behavior:

  1. Run the following command from something that is ARM 64, e.g., Mac M1.
docker run -it --rm arm64v8/ubuntu:jammy bash -c 'apt-get update && apt-get install -y curl && bash -c "$(curl --silent https://thoughtworks.github.io/talisman/scripts/install.bash)"'
  1. Feel sad.

Expected behavior I'd expect Talisman to install since arm64 and aarch64 are equivalent.

In my testing, the architecture case statement can be updated to treat aarch64 as arm64 and Talisman functions as expected.

https://github.com/thoughtworks/talisman/blob/main/global_install_scripts/install.bash#L114

This is how I ultimately installed it:

bash -c "$(curl --silent https://thoughtworks.github.io/talisman/scripts/install.bash | sed 's/"arm64")/"arm64" | "aarch64")/')"

Patch for install.bash

114c114
<     "arm64")
---
>     "arm64" | "aarch64")
tw-owen-nelson commented 5 months ago

Fixed in https://github.com/thoughtworks/talisman/pull/445