Skip to content

Commit

Permalink
Do not use deprecated poetry --dev option for installing packages (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
SaidBySolo authored Oct 11, 2022
1 parent c6ff83a commit af9793f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/client/common/installer/poetryInstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class PoetryInstaller extends ModuleInstaller {

protected async getExecutionInfo(moduleName: string, resource?: InterpreterUri): Promise<ExecutionInfo> {
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');
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/common/installer/poetryInstaller.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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',
});
});
Expand Down

0 comments on commit af9793f

Please sign in to comment.