Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ElenaDiachenko committed Dec 18, 2024
1 parent 165ee32 commit 17c4a30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/core/src/tasks/taskFinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ export const extractSingleExecutableTask = async (
suitableTasks: RnvTask[],
taskName: string
): Promise<RnvTask | undefined> => {
const { platform } = getContext();
if (suitableTasks.length === 1 && platform) {
if (suitableTasks.length === 1) {
return suitableTasks[0];
} else if (suitableTasks.length === 0) {
return undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ export default createTask({
isPrivate: true,
dependsOn: [RnvTaskName.projectConfigure],
fn: async ({ ctx, taskName, originTaskName }) => {
const { program } = ctx;
const { program, platform } = ctx;
await isBuildSchemeSupported();

const entryFile = getConfigProp('entryFile');

const dest = path.join(ctx.paths.project.dir, `${entryFile}.js`);
if (!fsExistsSync(dest)) {
if (!fsExistsSync(dest) && platform) {
if (!entryFile) {
logWarning(
`Missing ${chalk().red(entryFile)} key for ${chalk().bold.white(
Expand Down

0 comments on commit 17c4a30

Please sign in to comment.