Skip to content

Commit

Permalink
fix(scripts): Fix #73 postinstall windows friendly (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
madmath03 authored and NathanWalker committed Feb 14, 2019
1 parent 918098d commit 115b12a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"watch": "tsc -w -p tsconfig.json",
"test": "npm run build && jasmine src/**/*_spec.js",
"prepare": "npm run build",
"postinstall": "[ ! -f scripts/postinstall.js ] || node scripts/postinstall.js",
"postinstall": "node scripts/postinstall.js",
"debug": "node --debug-brk ./node_modules/@angular/cli/bin/ng g command",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"reset.changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0"
Expand Down
2 changes: 1 addition & 1 deletion scripts/postinstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const fsReadFile = promisify(fs.readFile);

export async function updateConfig() {
const cwd = process.cwd();
if (cwd.indexOf('node_modules/@nstudio/schematics') === -1) {
if (cwd.indexOf('node_modules/@nstudio/schematics') === -1 && cwd.indexOf('node_modules\\@nstudio\\schematics') === -1) {
// ignore: local development
return;
}
Expand Down

0 comments on commit 115b12a

Please sign in to comment.