Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Kriese <[email protected]>
  • Loading branch information
secustor and viceice authored May 17, 2023
1 parent 3c7f011 commit ecc2f9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/modules/manager/pep621/processors/pdm.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('modules/manager/pep621/processors/pdm', () => {
]);
});

it('rethrow error', async () => {
it('returns artifact error', async () => {
const execSnapshots = mockExecAll();
GlobalConfig.set({ ...adminConfig, binarySource: 'docker' });
fs.getSiblingFileName.mockReturnValueOnce('pdm.lock');
Expand Down
10 changes: 5 additions & 5 deletions lib/modules/manager/pep621/processors/pdm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ export class PdmProcessor implements PyProjectProcessor {
// else only update specific packages
let packageList = '';
if (!isLockFileMaintenance) {
packageList = updatedDeps
.map((value) => value.packageName ?? value.depName)
packageList = ' ' + updatedDeps
.map((value) => value.packageName)
.join(' ');
}
const cmd = `pdm update ${packageList}`;
await exec([cmd], execOptions);
const cmd = `pdm update${packageList}`;
await exec(cmd, execOptions);

// check for changes
const fileChanges: UpdateArtifactsResult[] = [];
Expand All @@ -102,7 +102,7 @@ export class PdmProcessor implements PyProjectProcessor {
logger.debug('pdm.lock is unchanged');
}

return fileChanges.length > 0 ? fileChanges : null;
return fileChanges.length ? fileChanges : null;
} catch (err) {
// istanbul ignore if
if (err.message === TEMPORARY_ERROR) {
Expand Down

0 comments on commit ecc2f9c

Please sign in to comment.