diff --git a/python/src/com/jetbrains/python/sdk/poetry/PoetryCommandExecutor.kt b/python/src/com/jetbrains/python/sdk/poetry/PoetryCommandExecutor.kt index 5cea4b1e61b0..713f2eb1e350 100644 --- a/python/src/com/jetbrains/python/sdk/poetry/PoetryCommandExecutor.kt +++ b/python/src/com/jetbrains/python/sdk/poetry/PoetryCommandExecutor.kt @@ -223,7 +223,9 @@ suspend fun poetryShowOutdated(sdk: Sdk): Result, List>> { // Just in case there were any changes to pyproject.toml if (runPoetryWithSdk(sdk, "lock", "--check").isFailure) { - runPoetryWithSdk(sdk, "lock", "--no-update") + if (runPoetryWithSdk(sdk, "lock", "--no-update").isFailure) { + runPoetryWithSdk(sdk, "lock") + } } val output = runPoetryWithSdk(sdk, "install", "--dry-run", "--no-root").getOrElse {