From 869cd11fcc1dc20d33489e5f0aff7305339b02ed Mon Sep 17 00:00:00 2001 From: Justinas Date: Tue, 17 Sep 2024 08:43:40 +0300 Subject: [PATCH] fixed a hanging, uninformative log --- packages/sdk-tizen/src/deviceManager.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/sdk-tizen/src/deviceManager.ts b/packages/sdk-tizen/src/deviceManager.ts index f79f08837..65222df4f 100644 --- a/packages/sdk-tizen/src/deviceManager.ts +++ b/packages/sdk-tizen/src/deviceManager.ts @@ -100,15 +100,14 @@ export const launchTizenEmulator = async (name: string | true): Promise name = chosenEmulator; } - - if (name) { + if (name && typeof name === 'string') { const ipRegex = /^(?:\d{1,3}\.){3}\d{1,3}:\d{1,5}$/; - if (name !== true && ipRegex.test(name)) { + if (ipRegex.test(name)) { // if ip is chosen, real device boot should start logInfo('Connecting to device'); c.runtime.target = name.split(':')[0]; await runTizenSimOrDevice(); - return true; + return new Promise(() => logInfo('Device is launched.')); } try { await executeAsync( @@ -430,8 +429,7 @@ Please create one and then edit the default target from ${c.paths.workspace.dir} await execCLI(CLI_TIZEN, `package -- "${intermediate}" -s ${certProfile} -t wgt -o "${tOut}"`); try { - // const packageID = platform === 'tizenwatch' || platform === 'tizenmobile' ? tId.split('.')[0] : tId; - const packageID = tId; + const packageID = platform === 'tizenwatch' || platform === 'tizenmobile' ? tId.split('.')[0] : tId; await execCLI(CLI_TIZEN, `uninstall -p ${packageID} -t ${deviceID}`, { ignoreErrors: true, });