Skip to content

Commit 17c4a30

Browse files
fix
1 parent 165ee32 commit 17c4a30

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

packages/core/src/tasks/taskFinder.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ export const extractSingleExecutableTask = async (
4747
suitableTasks: RnvTask[],
4848
taskName: string
4949
): Promise<RnvTask | undefined> => {
50-
const { platform } = getContext();
51-
if (suitableTasks.length === 1 && platform) {
50+
if (suitableTasks.length === 1) {
5251
return suitableTasks[0];
5352
} else if (suitableTasks.length === 0) {
5453
return undefined;

packages/engine-core/src/tasks/platform/taskPlatformConfigure.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ export default createTask({
2626
isPrivate: true,
2727
dependsOn: [RnvTaskName.projectConfigure],
2828
fn: async ({ ctx, taskName, originTaskName }) => {
29-
const { program } = ctx;
29+
const { program, platform } = ctx;
3030
await isBuildSchemeSupported();
3131

3232
const entryFile = getConfigProp('entryFile');
3333

3434
const dest = path.join(ctx.paths.project.dir, `${entryFile}.js`);
35-
if (!fsExistsSync(dest)) {
35+
if (!fsExistsSync(dest) && platform) {
3636
if (!entryFile) {
3737
logWarning(
3838
`Missing ${chalk().red(entryFile)} key for ${chalk().bold.white(

0 commit comments

Comments
 (0)