Skip to content

Commit 99c4af7

Browse files
committed
creation failure add action
1 parent 5837ed0 commit 99c4af7

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/features/creators/newPackageProject.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,20 @@ export class NewPackageProject implements PythonProjectCreator {
140140
quickCreate: true,
141141
});
142142
} else {
143-
window.showErrorMessage(
143+
const action = await window.showErrorMessage(
144144
l10n.t(
145-
'Creating virtual environment "{0}" failed during package creation since no environment manager supports quick create.',
145+
'Attempt at creating a virtual environment as part of new package "{0}" creation failed. Default environment manager does not support creating environments and no alternative was found.',
146146
packageName,
147147
),
148+
l10n.t('Create Environment Manually'),
148149
);
150+
if (action === l10n.t('Create Environment Manually')) {
151+
await commands.executeCommand('python-envs.createAny', {
152+
uri: createdPackage.uri,
153+
selectEnvironment: true,
154+
});
155+
createdEnv = await this.envManagers.getEnvironment(createdPackage.uri);
156+
}
149157
}
150158
}
151159
}

0 commit comments

Comments
 (0)