Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

[1.0.x] Remove checking poetry executable #201

Merged
merged 2 commits into from
Mar 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<idea-plugin url="https://github.com/koxudaxi/poetry-pycharm-plugin" require-restart="true">
<id>com.koxudaxi.poetry</id>
<name>Poetry</name>
<version>1.0.7</version>
<version>1.0.8</version>
<vendor email="koaxudai@gmail.com">Koudai Aono @koxudaxi</vendor>
<change-notes><![CDATA[
<h2>version 1.0.8</h2>
<p>Bug fixes</p>
<ul>
<li>Remove checking poetry executable [#201]</li>
</ul>
<h2>version 1.0.7</h2>
<p>Bug fixes</p>
<ul>
Expand Down
7 changes: 1 addition & 6 deletions src/com/koxudaxi/poetry/PyAddNewPoetryPanel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,11 @@ class PyAddNewPoetryPanel(private val project: Project?,
?: return ValidationInfo("Poetry executable is not found")
return when {
!executable.exists() -> ValidationInfo(PyBundle.message("python.sdk.file.not.found", executable.absolutePath))
!Files.isExecutable(executable.toPath()) || !executable.isFile || !testPoetryExecutable(executable) ->
ValidationInfo(PyBundle.message("python.sdk.cannot.execute", executable.absolutePath))
!Files.isExecutable(executable.toPath()) || !executable.isFile -> ValidationInfo(PyBundle.message("python.sdk.cannot.execute", executable.absolutePath))
else -> null
}
}

private fun testPoetryExecutable(executable: File): Boolean =
syncRunCommand(executable.parent, executable.absolutePath, "--version", defaultResult = false) { true }


/**
* Checks if the poetry for the project hasn't been already added.
*/
Expand Down