Skip to content

Commit

Permalink
Fixed issue with running on multiple devices
Browse files Browse the repository at this point in the history
  • Loading branch information
Ievgenii.Mykhalevskyi authored and Ievgenii.Mykhalevskyi committed Oct 18, 2024
1 parent 731e08a commit 911bc28
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Services/RunManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class RunManager {
await DebugAdapterTracker.updateStatus(this.sessionID, "launching");
const debugDeviceID = await context.projectSettingsProvider.projectEnv.debugDeviceID;
for (const device of devices) {
if (debugDeviceID.platform === device.platform) {
if (debugDeviceID.platform === device.platform && debugDeviceID.arch === device.arch) {
// we can run only on the platform that was built to
await this.runOnSimulator(context, device, false);
}
Expand Down
2 changes: 1 addition & 1 deletion src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ export async function runAppOnMultipleDevices(
const deviceIds: DeviceID[] = [];
if (Array.isArray(option)) {
for (const device of option) {
deviceIds.push(device.id);
deviceIds.push(device);
}
commandContext.projectSettingsProvider.projectEnv.setMultipleDeviceID(deviceIds);
}
Expand Down
2 changes: 1 addition & 1 deletion src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ function saveKeyToEnvList(configuration: { [key: string]: any }, key: string, va
throw ConfigurationProjectError;
}
configuration[key] = value;
const json = JSON.stringify(configuration);
const json = JSON.stringify(configuration, null, 2);
const fileDir = getEnvFilePath().split(path.sep).slice(0, -1).join(path.sep);
fs.mkdirSync(fileDir, { recursive: true });
fs.writeFileSync(getEnvFilePath(), json, "utf-8");
Expand Down

0 comments on commit 911bc28

Please sign in to comment.