Skip to content

Commit 27b958b

Browse files
authored
fix(cli): capacitor commands not working (#4918)
1 parent faaf6c6 commit 27b958b

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

packages/@ionic/cli/src/lib/integrations/capacitor/index.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { exec, ExecOptions } from 'child_process';
21
import { parseArgs } from '@ionic/cli-framework';
32
import { mkdirp, pathExists } from '@ionic/utils-fs';
43
import { prettyPath } from '@ionic/utils-terminal';
@@ -191,16 +190,7 @@ export class Integration extends BaseIntegration<ProjectIntegration> {
191190

192191
debug('Getting config with Capacitor CLI: %O', args);
193192

194-
const output = await ((cmd: string, opts: ExecOptions): Promise<string | undefined> => {
195-
return new Promise((resolve, reject) => {
196-
exec(cmd, opts, (error, stdout, stderr) => {
197-
if (error) {
198-
reject();
199-
}
200-
resolve(stdout);
201-
})
202-
})
203-
})(`capacitor ${args.join(' ')}`, { cwd: this.root });
193+
const output = await this.e.shell.cmdinfo('capacitor', args, { cwd: this.root });
204194

205195
if (!output) {
206196
debug('Could not get config from Capacitor CLI (probably old version)');

packages/@ionic/lab/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@
4444
"@ionic/cli-framework": "5.1.3",
4545
"@ionic/utils-fs": "3.1.6",
4646
"chalk": "^4.0.0",
47-
"express": "4.16.2",
47+
"express": "^4.16.2",
4848
"tslib": "^2.0.1"
4949
},
5050
"devDependencies": {
5151
"@ionic-internal/ionic-ds": "^2.1.0",
5252
"@stencil/core": "~1.8.5",
53-
"@types/express": "4.11.0",
54-
"@types/express-serve-static-core": "4.11.0",
53+
"@types/express": "4.17.13",
54+
"@types/express-serve-static-core": "4.17.28",
5555
"@types/node": "~10.17.13",
5656
"lint-staged": "^10.0.2",
5757
"rimraf": "^3.0.0",

packages/@ionic/v1-toolkit/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"chalk": "^4.0.0",
4343
"chokidar": "^3.0.1",
4444
"debug": "^4.0.0",
45-
"express": "4.16.2",
45+
"express": "^4.16.2",
4646
"gulp": "^4.0.2",
4747
"http-proxy-middleware": "^0.20.0",
4848
"tiny-lr": "^1.1.0",
@@ -51,8 +51,8 @@
5151
},
5252
"devDependencies": {
5353
"@types/debug": "^4.1.1",
54-
"@types/express": "4.11.0",
55-
"@types/express-serve-static-core": "4.11.0",
54+
"@types/express": "4.17.13",
55+
"@types/express-serve-static-core": "4.17.28",
5656
"@types/gulp": "^4.0.6",
5757
"@types/http-proxy-middleware": "^0.19.0",
5858
"@types/jest": "^26.0.10",

0 commit comments

Comments
 (0)