Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions server/src/incrementalCompilation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -595,13 +595,18 @@ async function figureOutBscArgs(entry: IncrementallyCompiledFileInfo) {
buildArgs.forEach(([key, value]: Array<string>) => {
if (key === "-I") {
if (isBsb) {
/*build.ninja could have quoted paths on Windows
// On Windows, the value could be wrapped in quotes.
value =
value.startsWith('"') && value.endsWith('"')
? value.substring(1, value.length - 1)
: value;
/*build.ninja could have quoted full paths
Example:
rule mij
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
*/
if (isWindows && value.startsWith('"') && value.endsWith('"')) {
callArgs.push("-I", value.substring(1, value.length - 1));
if (isWindows && value.includes(":\\")) {
callArgs.push("-I", value);
} else {
callArgs.push(
"-I",
Expand Down
Loading