Merge pull request #13278 from chrisroberts/windows-arch-map

Update CPU mapping values
This commit is contained in:
Chris Roberts 2023-10-19 11:29:38 -07:00 committed by GitHub
commit 275099771d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 4 deletions

View File

@ -27,10 +27,10 @@ module Vagrant
end
@_host_architecture = case RbConfig::CONFIG["target_cpu"]
when "x86_64"
when "amd64", "x86_64", "x64"
"amd64"
when "i386"
"386"
when "386", "i386", "x86"
"i386"
when "arm64", "aarch64"
"arm64"
else

View File

@ -28,11 +28,27 @@ describe Vagrant::Util::Platform do
end
end
context "when cpu is x64" do
let(:cpu_string) { "x64" }
it "should be mapped to amd64" do
expect(described_class.architecture).to eq("amd64")
end
end
context "when cpu is i386" do
let(:cpu_string) { "i386" }
it "should be mapped to i386" do
expect(described_class.architecture).to eq("i386")
end
end
context "when cpu is 386" do
let(:cpu_string) { "386" }
it "should be mapped to 386" do
expect(described_class.architecture).to eq("386")
expect(described_class.architecture).to eq("i386")
end
end