Skip to content

Commit

Permalink
fixed webos CLI not finding index
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaiblaga89 committed Oct 9, 2023
1 parent 628126e commit 3684ee1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/sdk-webos/src/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
getAppId,
getAppTitle,
getAppDescription,
copyFileSync
} from '@rnv/core';
import semver from 'semver';
import { runWebosSimOrDevice } from './deviceManager';
Expand Down Expand Up @@ -94,9 +95,19 @@ export const buildWebOSProject = async (c: RnvContext) => {

await buildCoreWebpackProject(c);


if (!c.program.hosted) {
const tDir = getPlatformProjectDir(c);
const tDir = path.join(getPlatformProjectDir(c)!, 'build');

Check warning

Code scanning / CodeQL

Unsafe shell command constructed from library input Medium

This path concatenation which depends on
library input
is later used in a
shell command
.
const tOut = path.join(getPlatformBuildDir(c)!, 'output');

const appinfoSrc = path.join(getPlatformProjectDir(c)!, 'appinfo.json');
const appinfoDest = path.join(tDir, 'appinfo.json');

copyFileSync(appinfoSrc, appinfoDest);
copyFileSync(path.join(getPlatformProjectDir(c)!, 'icon.png'), path.join(tDir, 'icon.png'));
copyFileSync(path.join(getPlatformProjectDir(c)!, 'largeIcon.png'), path.join(tDir, 'largeIcon.png'));
copyFileSync(path.join(getPlatformProjectDir(c)!, 'splashBackground.png'), path.join(tDir, 'splashBackground.png'));

await execCLI(c, CLI_WEBOS_ARES_PACKAGE, `-o ${tOut} ${tDir} -n`);

logSuccess(`Your IPK package is located in ${chalk().cyan(tOut)} .`);
Expand Down

0 comments on commit 3684ee1

Please sign in to comment.