Skip to content

Commit

Permalink
work on Windows too, phetsims/chipper#1247
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed May 19, 2022
1 parent ee05d14 commit feb26a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/scripts/absolute-tsc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
* arguments: perennial/js/scripts/absolute-tsc.js ${dir with a tsconfig, like chipper/tsconfig/all} ${path to replace, like ../../../}
* working dir: ${the root of the checkout, like /Users/samreid/apache-document-root/main/}
*
* This makes the files paths clickable
* IMPORTANT!!! This makes the files paths clickable in Webstorm:
* output filters: $FILE_PATH$\($LINE$\,$COLUMN$\)
*
* @author Sam Reid (PhET Interactive Simulations)
*/
const start = Date.now();
const execute = require( '../common/execute' );
const path = require( 'path' );

const args = process.argv.slice( 2 );
if ( !args || args.length === 0 ) {
Expand All @@ -43,7 +44,7 @@ if ( !args || args.length === 0 ) {
const lines = results.stdout.trim().split( '\n' );
const mapped = lines.map( line => {

return line.trim().split( args[ 1 ] ).join( process.cwd() + '/' );
return line.trim().split( args[ 1 ] ).join( process.cwd() + path.sep ).split( '/' ).join( path.sep );
} );

console.log( mapped.join( '\n' ) );
Expand Down

0 comments on commit feb26a4

Please sign in to comment.