Skip to content

Commit b902b82

Browse files
committed
Fix run in terminal
1 parent f42fb24 commit b902b82

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/client/envExt/api.internal.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ export async function runInTerminal(
7070
const envExtApi = await getEnvExtApi();
7171
const env = await getEnvironment(resource);
7272
const project = resource ? envExtApi.getPythonProject(resource) : undefined;
73-
if (env && project && resource) {
73+
if (env && resource) {
7474
return envExtApi.runInTerminal(env, {
75-
cwd: cwd ?? project.uri,
75+
cwd: cwd ?? project?.uri ?? process.cwd(),
7676
args,
7777
show,
7878
});
@@ -89,9 +89,9 @@ export async function runInDedicatedTerminal(
8989
const envExtApi = await getEnvExtApi();
9090
const env = await getEnvironment(resource);
9191
const project = resource ? envExtApi.getPythonProject(resource) : undefined;
92-
if (env && project) {
92+
if (env) {
9393
return envExtApi.runInDedicatedTerminal(resource ?? 'global', env, {
94-
cwd: cwd ?? project.uri,
94+
cwd: cwd ?? project?.uri ?? process.cwd(),
9595
args,
9696
show,
9797
});

0 commit comments

Comments
 (0)