Skip to content

Commit 0ed7773

Browse files
fknopvicb
authored andcommitted
build(gulp): Fix paths for public-api tasks on Windows (angular#9794)
1 parent 3f55aa6 commit 0ed7773

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gulpfile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const entrypoints = [
4949
'dist/packages-dist/forms/index.d.ts',
5050
'dist/packages-dist/router/index.d.ts'
5151
];
52-
const publicApiDir = 'tools/public_api_guard';
52+
const publicApiDir = path.normalize('tools/public_api_guard');
5353
const publicApiArgs = [
5454
'--rootDir', 'dist/packages-dist',
5555
'--stripExportPattern', '^__',
@@ -64,7 +64,7 @@ gulp.task('public-api:enforce', (done) => {
6464
const child_process = require('child_process');
6565
child_process
6666
.spawn(
67-
`${__dirname}/node_modules/.bin/ts-api-guardian`,
67+
path.join(__dirname, `/node_modules/.bin/ts-api-guardian${/^win/.test(os.platform()) ? '.cmd' : ''}`),
6868
['--verifyDir', publicApiDir].concat(publicApiArgs), {stdio: 'inherit'})
6969
.on('close', (errorCode) => {
7070
if (errorCode !== 0) {
@@ -80,7 +80,7 @@ gulp.task('public-api:update', (done) => {
8080
const child_process = require('child_process');
8181
child_process
8282
.spawn(
83-
`${__dirname}/node_modules/.bin/ts-api-guardian`,
83+
path.join(__dirname, `/node_modules/.bin/ts-api-guardian${/^win/.test(os.platform()) ? '.cmd' : ''}`),
8484
['--outDir', publicApiDir].concat(publicApiArgs), {stdio: 'inherit'})
8585
.on('close', (errorCode) => done(errorCode));
8686
});

0 commit comments

Comments
 (0)