Commit dac130b9 authored by nanahira's avatar nanahira

test rosetta

parent d54f349e
Pipeline #15020 passed with stages
in 5 minutes and 23 seconds
......@@ -36,6 +36,7 @@ export interface BaseAction {
export interface Action extends BaseAction {
interpreter?: string;
open?: App;
noRosetta?: boolean;
}
export interface SpawnAction extends BaseAction {
......@@ -334,6 +335,10 @@ export class App {
}
}
env = Object.assign(env, action.env);
if (action.noRosetta && await checkRosetta()) {
args = ['-arch', 'arm64', execute].concat(args);
execute = 'arch';
}
return {
execute,
args,
......@@ -358,10 +363,6 @@ export class App {
const appCwd = (<AppLocal>this.local).path;
const spawnAction = await this.getSpawnAction(children, action_name, null, null, null, argsTemplate);
if (await checkRosetta()) {
spawnAction.args = ['-arch', 'arm64', spawnAction.execute].concat(spawnAction.args);
spawnAction.execute = 'arch';
}
const { execute, args, env, cwd } = spawnAction;
console.log(execute, args, env, cwd, appCwd);
return child_process.spawn(execute, args, { env, cwd: cwd || appCwd });
......@@ -371,6 +372,10 @@ export class App {
return !!this.ygoproDistroData;
}
get isPreservingArch() {
return !!this.data.noRosetta;
}
get ygoproDistroData(): YGOProDistroData {
if(!this.data) {
return null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment