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

Commit

Permalink
Merge pull request #201 from koxudaxi/1.0.x_fix_replaced_python_verison
Browse files Browse the repository at this point in the history
[1.0.x] Remove checking poetry executable
  • Loading branch information
koxudaxi committed Mar 23, 2021
2 parents e4191dc + 3f73c60 commit d38700b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 6 additions & 1 deletion resources/META-INF/plugin.xml
@@ -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
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

0 comments on commit d38700b

Please sign in to comment.