Skip to content

Commit 75e635b

Browse files
authored
fix: Remove serve options from cap run command (#4736)
1 parent 61c3b2b commit 75e635b

File tree

1 file changed

+2
-14
lines changed
  • packages/@ionic/cli/src/commands/capacitor

1 file changed

+2
-14
lines changed

packages/@ionic/cli/src/commands/capacitor/run.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BaseError, Footnote, MetadataGroup, validators } from '@ionic/cli-framework';
1+
import { BaseError, Footnote, validators } from '@ionic/cli-framework';
22
import { sleepForever } from '@ionic/utils-process';
33
import { columnar } from '@ionic/utils-terminal';
44
import * as chalk from 'chalk';
@@ -28,7 +28,7 @@ interface NativeTarget {
2828

2929
export class RunCommand extends CapacitorCommand implements CommandPreRun {
3030
async getMetadata(): Promise<CommandMetadata> {
31-
const groups: string[] = [MetadataGroup.BETA];
31+
const groups: string[] = [];
3232
const exampleCommands = [
3333
'',
3434
'android',
@@ -92,7 +92,6 @@ export class RunCommand extends CapacitorCommand implements CommandPreRun {
9292
},
9393
];
9494

95-
const serveRunner = this.project && await this.project.getServeRunner();
9695
const buildRunner = this.project && await this.project.getBuildRunner();
9796

9897
if (buildRunner) {
@@ -102,17 +101,6 @@ export class RunCommand extends CapacitorCommand implements CommandPreRun {
102101
footnotes.push(...libmetadata.footnotes || []);
103102
}
104103

105-
if (serveRunner) {
106-
const libmetadata = await serveRunner.getCommandMetadata();
107-
const existingOpts = options.map(o => o.name);
108-
groups.push(...libmetadata.groups || []);
109-
const runnerOpts = (libmetadata.options || [])
110-
.filter(o => !existingOpts.includes(o.name))
111-
.map(o => ({ ...o, hint: `${o.hint ? `${o.hint} ` : ''}${weak('(--livereload)')}` }));
112-
options = lodash.uniqWith([...runnerOpts, ...options], (optionA, optionB) => optionA.name === optionB.name);
113-
footnotes.push(...libmetadata.footnotes || []);
114-
}
115-
116104
return {
117105
name: 'run',
118106
type: 'project',

0 commit comments

Comments
 (0)