File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -595,13 +595,18 @@ async function figureOutBscArgs(entry: IncrementallyCompiledFileInfo) {
595595 buildArgs . forEach ( ( [ key , value ] : Array < string > ) => {
596596 if ( key === "-I" ) {
597597 if ( isBsb ) {
598- /*build.ninja could have quoted paths on Windows
598+ // On Windows, the value could be wrapped in quotes.
599+ value =
600+ value . startsWith ( '"' ) && value . endsWith ( '"' )
601+ ? value . substring ( 1 , value . length - 1 )
602+ : value ;
603+ /*build.ninja could have quoted full paths
599604 Example:
600605rule mij
601606 command = "C:\Users\moi\Projects\my-project\node_modules\rescript\win32\bsc.exe" -I src -I "C:\Users\moi\Projects\my-project\node_modules\@rescript\core\lib\ocaml" -open RescriptCore -uncurried -bs-package-name rewindow -bs-package-output esmodule:$in_d:.res.mjs -bs-v $g_finger $i
602607 */
603- if ( isWindows && value . startsWith ( '"' ) && value . endsWith ( '"' ) ) {
604- callArgs . push ( "-I" , value . substring ( 1 , value . length - 1 ) ) ;
608+ if ( isWindows && value . includes ( ":\\" ) ) {
609+ callArgs . push ( "-I" , value ) ;
605610 } else {
606611 callArgs . push (
607612 "-I" ,
You can’t perform that action at this time.
0 commit comments