Skip to content

Commit

Permalink
fix(poetry): lockFileMaintenance (#9695)
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Apr 26, 2021
1 parent ce51f05 commit fb50312
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/manager/poetry/artifacts.spec.ts
Expand Up @@ -209,7 +209,7 @@ describe('.updateArtifacts()', () => {
newPackageFileContent: '{}',
config: {
...config,
isLockFileMaintenance: true,
updateType: 'lockFileMaintenance',
},
})
).not.toBeNull();
Expand Down
6 changes: 4 additions & 2 deletions lib/manager/poetry/artifacts.ts
Expand Up @@ -91,7 +91,9 @@ export async function updateArtifacts({
config,
}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {
logger.debug(`poetry.updateArtifacts(${packageFileName})`);
if (!is.nonEmptyArray(updatedDeps) && !config.isLockFileMaintenance) {
const isLockFileMaintenance = config.updateType === 'lockFileMaintenance';

if (!is.nonEmptyArray(updatedDeps) && !isLockFileMaintenance) {
logger.debug('No updated poetry deps - returning null');
return null;
}
Expand All @@ -111,7 +113,7 @@ export async function updateArtifacts({
try {
await writeLocalFile(packageFileName, newPackageFileContent);
const cmd: string[] = [];
if (config.isLockFileMaintenance) {
if (isLockFileMaintenance) {
await deleteLocalFile(lockFileName);
cmd.push('poetry update --lock --no-interaction');
} else {
Expand Down

0 comments on commit fb50312

Please sign in to comment.