File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -595,13 +595,15 @@ 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 = value . startsWith ( '"' ) && value . endsWith ( '"' ) ? value . substring ( 1 , value . length - 1 ) : value ;
600+ /*build.ninja could have quoted full paths
599601 Example:
600602rule mij
601603 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
602604 */
603- if ( isWindows && value . startsWith ( '"' ) && value . endsWith ( '"' ) ) {
604- callArgs . push ( "-I" , value . substring ( 1 , value . length - 1 ) ) ;
605+ if ( isWindows && value . includes ( ":\\" ) ) {
606+ callArgs . push ( "-I" , value ) ;
605607 } else {
606608 callArgs . push (
607609 "-I" ,
You can’t perform that action at this time.
0 commit comments