Skip to content

Commit

Permalink
Merge pull request #1708 from flexn-io/fix/webos_target_ip
Browse files Browse the repository at this point in the history
[webOS] Run device with ip address
  • Loading branch information
locksten authored Sep 19, 2024
2 parents f5e38d8 + 673b176 commit 16d51b0
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/sdk-webos/src/deviceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ export const runWebosSimOrDevice = async () => {
if (device) {
// Running on a device
const actualDevices = devices.filter((d) => d.isDevice);

if (!actualDevices.length) {
// No device configured. Asking to configure
const response = await inquirerPrompt({
Expand Down Expand Up @@ -340,7 +339,14 @@ export const runWebosSimOrDevice = async () => {
}
}
} else {
// Target specified, using that
return installAndLaunchApp(c.program.opts().target, appPath, tId);
const target_name =
devices.find((device) => {
return device.device.includes(c.program.opts().target) || device.name.includes(c.program.opts().target);
})?.name;

if(!target_name){
return Promise.reject(`Target ${c.program.opts().target} doesn't exist.`);
}
return installAndLaunchApp(target_name, appPath, tId);
}
};

0 comments on commit 16d51b0

Please sign in to comment.