Skip to content

Commit

Permalink
Fix jack-in prompt never appearing on windows
Browse files Browse the repository at this point in the history
Doesn't seem to happen to users out there, but on my Windows machine
jack-in doesn't work.

Fixes #885
  • Loading branch information
PEZ committed Dec 23, 2020
1 parent 3a80ba6 commit 0d40be4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,17 +253,18 @@ async function findProjectRootUri(projectFileNames, doc, workspaceFolder): Promi
let searchUri = doc?.uri || workspaceFolder?.uri;
let prev = null;
while (searchUri != prev) {
for (let projectFile in projectFileNames) {
const u = vscode.Uri.joinPath(searchUri, projectFileNames[projectFile]);
try {
const stat = await vscode.workspace.fs.stat(u);
if (stat) {
try {
for (let projectFile in projectFileNames) {
const u = vscode.Uri.joinPath(searchUri, projectFileNames[projectFile]);
try {
await vscode.workspace.fs.stat(u);
cursor.set(PROJECT_DIR_URI_KEY, searchUri);
return;
}
catch { }
}
catch (_) { }
}
catch (_) { }
prev = searchUri;
searchUri = vscode.Uri.joinPath(searchUri, "..");
}
Expand Down

0 comments on commit 0d40be4

Please sign in to comment.