From 525cccff283168c42f984b58588b60e52c3af134 Mon Sep 17 00:00:00 2001 From: Marcus from Windows Desktop Date: Mon, 3 Aug 2020 12:29:12 +0100 Subject: [PATCH] Change '/' to path.sep 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. --- tools/scripts/postinstall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/scripts/postinstall b/tools/scripts/postinstall index b5a236bd4f6e..2aef343a63ab 100755 --- a/tools/scripts/postinstall +++ b/tools/scripts/postinstall @@ -306,7 +306,7 @@ function main() { debug( 'Modifying package meta data...' ); for ( i = 0; i < pkgs.length; i++ ) { pdir = pkgs[ i ].slice( PKG_DIR.length+1 ); // +1 to account for trailing `/` - if ( pdir[ 0 ] !== '_' && pdir.split( '/' ).length === 1 ) { + if ( pdir[ 0 ] !== '_' && pdir.split( path.sep ).length === 1 ) { meta.dependencies[ '@stdlib/'+pdir ] = 'file:./lib/node_modules/@stdlib/'+pdir; } }