Skip to content

Commit af86c92

Browse files
authored
Change '/' to path.sep (stdlib-js#352)
On Windows, package.json ends up with a bunch of "\\" in the dependencies, which breaks npm install after the first installation. This should fix that.
1 parent caed916 commit af86c92

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/scripts/postinstall

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ function main() {
306306
debug( 'Modifying package meta data...' );
307307
for ( i = 0; i < pkgs.length; i++ ) {
308308
pdir = pkgs[ i ].slice( PKG_DIR.length+1 ); // +1 to account for trailing `/`
309-
if ( pdir[ 0 ] !== '_' && pdir.split( '/' ).length === 1 ) {
309+
if ( pdir[ 0 ] !== '_' && pdir.split( path.sep ).length === 1 ) {
310310
meta.dependencies[ '@stdlib/'+pdir ] = 'file:./lib/node_modules/@stdlib/'+pdir;
311311
}
312312
}

0 commit comments

Comments
 (0)