Skip to content

Commit

Permalink
removed kaios default target update functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
ElenaDiachenko committed Nov 26, 2024
1 parent f06d9d4 commit 21e8a8b
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions packages/sdk-kaios/src/deviceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ import {
logWarning,
chalk,
} from '@rnv/core';
import { updateDefaultTargets } from '@rnv/sdk-utils';
import path from 'path';

export const launchKaiOSSimulator = async (target: string | boolean) => {
const c = getContext();
logDefault(`launchKaiOSSimulator: ${target}`);
if (!c.platform) return;
const defaultTarget = c.buildConfig.defaultTargets?.[c.platform];

const kaiosSdkPath = getRealPath(c.buildConfig?.sdks?.KAIOS_SDK);

if (!kaiosSdkPath) {
Expand All @@ -37,18 +35,11 @@ export const launchKaiOSSimulator = async (target: string | boolean) => {
choices: availableSimulatorVersions,
});
target = selectedSimulator;
if (!defaultTarget || defaultTarget !== selectedSimulator) {
await updateDefaultTargets(c, selectedSimulator);
}
} else if (typeof target === 'string' && !availableSimulatorVersions.includes(target)) {
logWarning(
`${
defaultTarget && !c.program.opts().target
? `The default target specified in ${chalk().cyan(c.paths.dotRnv.config)} or ${chalk().cyan(
c.paths.project.configLocal
)}`
: 'Target'
} with name ${chalk().red(target)} does not exist.`
`Target with name ${chalk().red(target)} does not exist. You can update it here: ${chalk().cyan(
c.paths.dotRnv.config
)}`
);
await launchKaiOSSimulator(true);
return true;
Expand Down

0 comments on commit 21e8a8b

Please sign in to comment.