From 4dbe60c8ef6c688b559eec140bf3406e50945b5a Mon Sep 17 00:00:00 2001 From: Caner Derici Date: Mon, 12 Sep 2022 16:41:57 -0600 Subject: [PATCH] Make sure original arch name could match --- arch/arch.go | 2 +- arch/arch_test.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arch.go b/arch/arch.go index 155b2a31..765e17ba 100644 --- a/arch/arch.go +++ b/arch/arch.go @@ -63,7 +63,7 @@ var archREs = []struct { {regexp.MustCompile("aarch64"), ARM64}, {regexp.MustCompile("ppc64|ppc64el|ppc64le"), PPC64EL}, {regexp.MustCompile("s390x"), S390X}, - {regexp.MustCompile("risc$|risc-[vV]64"), RISCV64}, + {regexp.MustCompile("riscv64|risc$|risc-[vV]64"), RISCV64}, } // Override for testing. diff --git a/arch/arch_test.go b/arch/arch_test.go index 933e9c6a..b16c2f15 100644 --- a/arch/arch_test.go +++ b/arch/arch_test.go @@ -40,6 +40,7 @@ func (s *archSuite) TestNormaliseArch(c *gc.C) { {"ppc64le", "ppc64el"}, {"ppc64", "ppc64el"}, {"s390x", "s390x"}, + {"riscv64", "riscv64"}, {"risc", "riscv64"}, {"risc-v64", "riscv64"}, {"risc-V64", "riscv64"},