File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 * found in the LICENSE file at https://angular.dev/license
77 */
88
9- import { execSync , spawnSync } from 'child_process' ;
9+ import { execSync } from 'child_process' ;
1010import { join , dirname } from 'path' ;
1111import { BuiltPackage } from '@angular/ng-dev' ;
1212import { fileURLToPath } from 'url' ;
13+ import { existsSync , lstatSync } from 'fs' ;
1314
1415/** Path to the project directory. */
1516export const projectDir : string = join ( dirname ( fileURLToPath ( import . meta. url ) ) , '../..' ) ;
@@ -72,7 +73,7 @@ function buildReleasePackages(
7273 // do this to ensure that the version placeholders are properly populated.
7374 packageNames . forEach ( ( pkgName ) => {
7475 const outputPath = getBazelOutputPath ( pkgName ) ;
75- if ( spawnSync ( `[ -d ${ outputPath } ]` ) . status !== 0 ) {
76+ if ( existsSync ( outputPath ) && lstatSync ( outputPath ) . isDirectory ( ) ) {
7677 exec ( `chmod -R u+w ${ outputPath } ` ) ;
7778 exec ( `rm -rf ${ outputPath } ` ) ;
7879 }
You can’t perform that action at this time.
0 commit comments