diff options
author | Sahandevs <[email protected]> | 2021-02-07 18:36:16 +0000 |
---|---|---|
committer | Sahandevs <[email protected]> | 2021-02-07 18:36:16 +0000 |
commit | 2f82a84d2a06e24296bdbc4e8f50131539d5a749 (patch) | |
tree | 302b1d5a48f84d1b41ff9d0296597fc701bd6558 /editors/code/src/debug.ts | |
parent | 3a0234d60f924cdec4a3fa2fccfe7ed85567f0bc (diff) |
fix errors
Diffstat (limited to 'editors/code/src/debug.ts')
-rw-r--r-- | editors/code/src/debug.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/editors/code/src/debug.ts b/editors/code/src/debug.ts index 3c113e46e..c72a7b278 100644 --- a/editors/code/src/debug.ts +++ b/editors/code/src/debug.ts | |||
@@ -87,12 +87,14 @@ async function getDebugConfiguration(ctx: Ctx, runnable: ra.Runnable): Promise<v | |||
87 | if (ctx.config.debug.openDebugPane) { | 87 | if (ctx.config.debug.openDebugPane) { |
88 | debugOutput.show(true); | 88 | debugOutput.show(true); |
89 | } | 89 | } |
90 | 90 | // folder exists or RA is not active. | |
91 | const isMultiFolderWorkspace = vscode.workspace.workspaceFolders.length > 1; | 91 | // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion |
92 | const firstWorkspace = vscode.workspace.workspaceFolders[0]; // folder exists or RA is not active. | 92 | const workspaceFolders = vscode.workspace.workspaceFolders!; |
93 | const isMultiFolderWorkspace = workspaceFolders.length > 1; | ||
94 | const firstWorkspace = workspaceFolders[0]; | ||
93 | const workspace = !isMultiFolderWorkspace || !runnable.args.workspaceRoot ? | 95 | const workspace = !isMultiFolderWorkspace || !runnable.args.workspaceRoot ? |
94 | firstWorkspace : | 96 | firstWorkspace : |
95 | vscode.workspace.workspaceFolders.find(w => runnable.args.workspaceRoot?.includes(w.uri.fsPath)) || firstWorkspace; | 97 | workspaceFolders.find(w => runnable.args.workspaceRoot?.includes(w.uri.fsPath)) || firstWorkspace; |
96 | 98 | ||
97 | const wsFolder = path.normalize(workspace.uri.fsPath); | 99 | const wsFolder = path.normalize(workspace.uri.fsPath); |
98 | const workspaceQualifier = isMultiFolderWorkspace ? `:${workspace.name}` : ''; | 100 | const workspaceQualifier = isMultiFolderWorkspace ? `:${workspace.name}` : ''; |