Skip to content

Commit

Permalink
fix(cli): capacitor commands not working (#4918)
Browse files Browse the repository at this point in the history
  • Loading branch information
IT-MikeS authored Oct 6, 2022
1 parent faaf6c6 commit 27b958b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
12 changes: 1 addition & 11 deletions packages/@ionic/cli/src/lib/integrations/capacitor/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { exec, ExecOptions } from 'child_process';
import { parseArgs } from '@ionic/cli-framework';
import { mkdirp, pathExists } from '@ionic/utils-fs';
import { prettyPath } from '@ionic/utils-terminal';
Expand Down Expand Up @@ -191,16 +190,7 @@ export class Integration extends BaseIntegration<ProjectIntegration> {

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

const output = await ((cmd: string, opts: ExecOptions): Promise<string | undefined> => {
return new Promise((resolve, reject) => {
exec(cmd, opts, (error, stdout, stderr) => {
if (error) {
reject();
}
resolve(stdout);
})
})
})(`capacitor ${args.join(' ')}`, { cwd: this.root });
const output = await this.e.shell.cmdinfo('capacitor', args, { cwd: this.root });

if (!output) {
debug('Could not get config from Capacitor CLI (probably old version)');
Expand Down
6 changes: 3 additions & 3 deletions packages/@ionic/lab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
"@ionic/cli-framework": "5.1.3",
"@ionic/utils-fs": "3.1.6",
"chalk": "^4.0.0",
"express": "4.16.2",
"express": "^4.16.2",
"tslib": "^2.0.1"
},
"devDependencies": {
"@ionic-internal/ionic-ds": "^2.1.0",
"@stencil/core": "~1.8.5",
"@types/express": "4.11.0",
"@types/express-serve-static-core": "4.11.0",
"@types/express": "4.17.13",
"@types/express-serve-static-core": "4.17.28",
"@types/node": "~10.17.13",
"lint-staged": "^10.0.2",
"rimraf": "^3.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/@ionic/v1-toolkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"chalk": "^4.0.0",
"chokidar": "^3.0.1",
"debug": "^4.0.0",
"express": "4.16.2",
"express": "^4.16.2",
"gulp": "^4.0.2",
"http-proxy-middleware": "^0.20.0",
"tiny-lr": "^1.1.0",
Expand All @@ -51,8 +51,8 @@
},
"devDependencies": {
"@types/debug": "^4.1.1",
"@types/express": "4.11.0",
"@types/express-serve-static-core": "4.11.0",
"@types/express": "4.17.13",
"@types/express-serve-static-core": "4.17.28",
"@types/gulp": "^4.0.6",
"@types/http-proxy-middleware": "^0.19.0",
"@types/jest": "^26.0.10",
Expand Down

0 comments on commit 27b958b

Please sign in to comment.