[#877] Fix Runtime.exec() in Rosetta build script

This commit is contained in:
Honza Rychnovský 2023-06-12 15:14:10 +02:00 committed by GitHub
parent 8f7ad094a4
commit 53fbd138df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ fun isRosetta(): Boolean {
// Counterintuitive, but running under Rosetta is reported as Intel64 to the JVM
if (!System.getProperty("os.arch").lowercase(java.util.Locale.ROOT).contains("aarch64")) {
val outputValue = Runtime.getRuntime()
.exec(arrayOf("sysctl -in sysctl.proc_translated"))
.exec(arrayOf("sysctl", "-in", "sysctl.proc_translated"))
.scanOutputLine()
.toIntOrNull()