Skip to content

Commit a05ad67

Browse files
committed
Remove rosetta2 hack for macOS.
1 parent c05c7e4 commit a05ad67

File tree

3 files changed

+2
-26
lines changed

3 files changed

+2
-26
lines changed

src/jreleaser/distributions/sdkman-cli/brew/formula.rb.tpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ class {{brewFormulaName}} < Formula
2323
sdkman_curl_max_time=10
2424
sdkman_debug_mode=false
2525
sdkman_insecure_ssl=false
26-
sdkman_rosetta2_compatible=false
2726
sdkman_selfupdate_feature=false
2827
EOS
2928
end

src/main/bash/sdkman-init.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,7 @@ function infer_platform() {
7070
echo "DarwinX64"
7171
;;
7272
arm64)
73-
if [[ "$sdkman_rosetta2_compatible" == 'true' ]]; then
74-
echo "DarwinX64"
75-
else
76-
echo "DarwinARM64"
77-
fi
73+
echo "DarwinARM64"
7874
;;
7975
*)
8076
echo "DarwinX64"

src/test/groovy/sdkman/specs/PlatformSpec.groovy

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,8 @@ class PlatformSpec extends SdkmanEnvSpecification {
3636
"Linux" | "" | "exotic"
3737
"Darwin" | "x86_64" | "darwinx64"
3838
"Darwin" | "arm64" | "darwinarm64"
39-
"Darwin" | "" | "darwinx64"
40-
"MSYS64" | "i686" | "msys64"
39+
"MSYS64" | "x86_64" | "msys64"
4140
"MSYS64" | "" | "msys64"
4241
"CYGWIN" | "" | "exotic"
4342
}
44-
45-
def "should enable rosetta 2 compatibility mode with environment variable"() {
46-
given:
47-
unameStub.forKernel("Darwin").forMachine("arm64")
48-
bash = sdkmanBashEnvBuilder
49-
.withUnameStub(unameStub)
50-
.withConfiguration("sdkman_rosetta2_compatible", "true")
51-
.build()
52-
bash.start()
53-
bash.execute("source $bootstrapScript")
54-
55-
when:
56-
bash.execute('echo $SDKMAN_PLATFORM')
57-
58-
then:
59-
!bash.output.contains("darwinarm64")
60-
bash.output.contains("darwinx64")
61-
}
6243
}

0 commit comments

Comments
 (0)