Skip to content

Commit 1cc9af7

Browse files
Namito Yokota3cp
Namito Yokota
authored andcommitted
Suggested code changes.
1 parent 4c0b34e commit 1cc9af7

File tree

5 files changed

+8
-15
lines changed

5 files changed

+8
-15
lines changed

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ dist
1111
/coverage
1212
/package-lock.json
1313
/yarn.lock
14-
.npmrc
15-
/my-app
14+
.npmrc

CHANGELOG.md

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
## [3.0.3](https://github.com/aurelia/cli/compare/v3.0.2...v3.0.3) (2024-04-17)
2-
3-
4-
51
## [3.0.2](https://github.com/aurelia/cli/compare/v3.0.1...v3.0.2) (2023-10-07)
62

73

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ The `au new` command now simplify wraps `npx makes aurelia/v1`. Users can direct
2727
1. Clone the aurelia-cli: `git clone https://github.com/aurelia/cli.git`
2828
2. Go into the cli directory: `cd cli`
2929
3. Run `npm install`
30-
6. Link the cli with: `npm link`
31-
7. Create a new project with `au new` or use an existing project. The linked CLI will be used to create the project.
32-
8. In the project directory, run `npm link aurelia-cli`. The linked CLI will then be used for `au` commands such as `au run`
30+
4. Link the cli with: `npm link`
31+
5. Create a new project with `au new` or use an existing project. The linked CLI will be used to create the project.
32+
6. In the project directory, run `npm link aurelia-cli`. The linked CLI will then be used for `au` commands such as `au run`
3333

3434
## Running the Tests
3535

lib/package-managers/base-package-manager.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const {spawn} = require('child_process');
22
const npmWhich = require('npm-which');
3+
const isWindows = process.platform === "win32";
34

45
exports.BasePackageManager = class {
56
constructor(executableName) {
@@ -11,19 +12,16 @@ exports.BasePackageManager = class {
1112
}
1213

1314
run(command, args = [], workingDirectory = process.cwd()) {
14-
const isWindows = process.platform === "win32";
1515
let executable = this.getExecutablePath(workingDirectory);
16-
let options = { stdio: "inherit", cwd: workingDirectory };
1716
if (isWindows) {
18-
executable = `"${executable}"`
19-
options = { ...options, shell: true }
17+
executable = JSON.stringify(executable); // Add quotes around path
2018
}
2119

2220
return new Promise((resolve, reject) => {
2321
this.proc = spawn(
2422
executable,
2523
[command, ...args],
26-
options
24+
{ stdio: "inherit", cwd: workingDirectory, shell: isWindows }
2725
)
2826
.on('close', resolve)
2927
.on('error', reject);

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aurelia-cli",
3-
"version": "3.0.3",
3+
"version": "3.0.2",
44
"description": "The command line tooling for Aurelia.",
55
"keywords": [
66
"aurelia",

0 commit comments

Comments
 (0)