dont execute arm on windows amd64

This commit is contained in:
Partouf
2025-04-21 19:18:40 +02:00
parent 2394a80944
commit d050deb9e0
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -123,11 +123,11 @@ export class BinaryInfoLinux {
return undefined;
}
static async readFile(filepath: string): Promise<BinaryInfo | undefined> {
static async readFile(filepath: string, instructionSetHint?: InstructionSet): Promise<BinaryInfo | undefined> {
if (os.platform() === 'win32') {
return {
os: OSType.windows,
instructionSet: 'amd64',
instructionSet: instructionSetHint || 'amd64',
};
}
const info = await executeDirect('/usr/bin/file', ['-b', filepath], {});
+1 -1
View File
@@ -76,7 +76,7 @@ export class RemoteExecutionQuery {
const triple = new BaseExecutionTriple();
if (result.executableFilename) {
const info = await BinaryInfoLinux.readFile(result.executableFilename);
const info = await BinaryInfoLinux.readFile(result.executableFilename, result.instructionSet);
if (info) {
triple.instructionSet = info.instructionSet;
triple.os = info.os;