diff --git a/src/client/common/installer/poetryInstaller.ts b/src/client/common/installer/poetryInstaller.ts index 0690a9eeba96..ea9de510cadd 100644 --- a/src/client/common/installer/poetryInstaller.ts +++ b/src/client/common/installer/poetryInstaller.ts @@ -70,7 +70,7 @@ export class PoetryInstaller extends ModuleInstaller { protected async getExecutionInfo(moduleName: string, resource?: InterpreterUri): Promise { const execPath = this.configurationService.getSettings(isResource(resource) ? resource : undefined).poetryPath; - const args = ['add', '--dev', moduleName]; + const args = ['add', '--group', 'dev', moduleName]; if (moduleName === 'black') { args.push('--allow-prereleases'); } diff --git a/src/test/common/installer/poetryInstaller.unit.test.ts b/src/test/common/installer/poetryInstaller.unit.test.ts index f5d36f1e2bab..9046ce59d1b0 100644 --- a/src/test/common/installer/poetryInstaller.unit.test.ts +++ b/src/test/common/installer/poetryInstaller.unit.test.ts @@ -103,7 +103,7 @@ suite('Module Installer - Poetry', () => { const info = await poetryInstaller.getExecutionInfo('something', uri); - assert.deepEqual(info, { args: ['add', '--dev', 'something'], execPath: 'poetry path' }); + assert.deepEqual(info, { args: ['add', '--group', 'dev', 'something'], execPath: 'poetry path' }); }); test('Get executable info when installing black', async () => { const uri = Uri.file(__dirname); @@ -115,7 +115,7 @@ suite('Module Installer - Poetry', () => { const info = await poetryInstaller.getExecutionInfo('black', uri); assert.deepEqual(info, { - args: ['add', '--dev', 'black', '--allow-prereleases'], + args: ['add', '--group', 'dev', 'black', '--allow-prereleases'], execPath: 'poetry path', }); });