File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,9 @@ function loadNativeModule(): Native {
42
42
function getTarget ( ) : String {
43
43
const platform = os . platform ( ) . toLowerCase ( ) ;
44
44
const arch = os . arch ( ) . toLowerCase ( ) ;
45
-
46
- // Windows
47
- if ( platform . includes ( "win" ) && arch . includes ( "x64" ) ) {
48
- return "x86_64-pc-windows-msvc" ;
49
-
45
+
50
46
// MacOS
51
- } else if ( platform . includes ( "darwin" ) && arch . includes ( "x64" ) ) {
47
+ if ( platform . includes ( "darwin" ) && arch . includes ( "x64" ) ) {
52
48
return "x86_64-apple-darwin" ;
53
49
} else if ( platform . includes ( "darwin" ) && arch . includes ( "arm64" ) ) {
54
50
return "aarch64-apple-darwin" ;
@@ -58,9 +54,13 @@ function getTarget(): String {
58
54
return "x86_64-unknown-linux-gnu" ;
59
55
} else if ( platform . includes ( "linux" ) && arch . includes ( "arm64" ) ) {
60
56
return "aarch64-unknown-linux-gnu" ;
57
+
58
+ // Windows
59
+ } else if ( platform . includes ( "win32" ) && arch . includes ( "x64" ) ) {
60
+ return "x86_64-pc-windows-msvc" ;
61
61
}
62
62
63
- throw new Error (
63
+ throw new Error (
64
64
`Operating System: ${ platform } Architecture: ${ arch } is not supported!` ,
65
65
) ;
66
66
}
You can’t perform that action at this time.
0 commit comments