File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 11## 1.0.x (unreleased)
22- Fix diagnostics when location's not found (advice: use fewer ppxes!). See [ #77 ] ( https://github.com/rescript-lang/rescript-vscode/issues/77 ) .
3+ - Fix request failing when there's a white space in the project path.
34
45## 1.0.5
56
Original file line number Diff line number Diff line change @@ -19,7 +19,11 @@ let findExecutable = (uri: string) => {
1919 if ( projectRootPath == null || ! binaryExists ) {
2020 return null ;
2121 } else {
22- return { binaryPath, filePath, cwd : projectRootPath } ;
22+ return {
23+ binaryPathQuoted : '"' + binaryPath + '"' , // path could have white space
24+ filePathQuoted : '"' + filePath + '"' ,
25+ cwd : projectRootPath ,
26+ } ;
2327 }
2428} ;
2529
@@ -34,9 +38,9 @@ export function runDumpCommand(
3438 onResult ( null ) ;
3539 } else {
3640 let command =
37- executable . binaryPath +
41+ executable . binaryPathQuoted +
3842 " dump " +
39- executable . filePath +
43+ executable . filePathQuoted +
4044 ":" +
4145 msg . params . position . line +
4246 ":" +
@@ -65,9 +69,9 @@ export function runCompletionCommand(
6569 fs . writeFileSync ( tmpname , code , { encoding : "utf-8" } ) ;
6670
6771 let command =
68- executable . binaryPath +
72+ executable . binaryPathQuoted +
6973 " complete " +
70- executable . filePath +
74+ executable . filePathQuoted +
7175 ":" +
7276 msg . params . position . line +
7377 ":" +
You can’t perform that action at this time.
0 commit comments