Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
ae1773d6
Unverified
Commit
ae1773d6
authored
May 31, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed wrong executable being picked up on Windows in poetry run
parent
eec9a33b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletions
+12
-1
CHANGELOG.md
+1
-0
poetry/utils/venv.py
+11
-1
No files found.
CHANGELOG.md
View file @
ae1773d6
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
-
Fixed a
`UnicodeDecodeError`
when an error occurs in venv.
-
Fixed a
`UnicodeDecodeError`
when an error occurs in venv.
-
Fixed Python requirements not properly set when resolving dependencies.
-
Fixed Python requirements not properly set when resolving dependencies.
-
Fixed terminal coloring being activated even if not supported.
-
Fixed terminal coloring being activated even if not supported.
-
Fixed wrong executable being picked up on Windows in
`poetry run`
.
## [0.10.1] - 2018-05-28
## [0.10.1] - 2018-05-28
...
...
poetry/utils/venv.py
View file @
ae1773d6
...
@@ -235,6 +235,9 @@ class Venv(object):
...
@@ -235,6 +235,9 @@ class Venv(object):
"""
"""
Run a command inside the virtual env.
Run a command inside the virtual env.
"""
"""
if
self
.
_windows
:
bin
=
self
.
_bin
(
bin
)
cmd
=
[
bin
]
+
list
(
args
)
cmd
=
[
bin
]
+
list
(
args
)
shell
=
kwargs
.
get
(
"shell"
,
False
)
shell
=
kwargs
.
get
(
"shell"
,
False
)
call
=
kwargs
.
pop
(
"call"
,
False
)
call
=
kwargs
.
pop
(
"call"
,
False
)
...
@@ -276,6 +279,9 @@ class Venv(object):
...
@@ -276,6 +279,9 @@ class Venv(object):
if
not
self
.
is_venv
():
if
not
self
.
is_venv
():
return
subprocess
.
call
([
bin
]
+
list
(
args
))
return
subprocess
.
call
([
bin
]
+
list
(
args
))
else
:
else
:
if
self
.
_windows
:
bin
=
self
.
_bin
(
bin
)
with
self
.
temp_environ
():
with
self
.
temp_environ
():
os
.
environ
[
"PATH"
]
=
self
.
_path
()
os
.
environ
[
"PATH"
]
=
self
.
_path
()
os
.
environ
[
"VIRTUAL_ENV"
]
=
str
(
self
.
_venv
)
os
.
environ
[
"VIRTUAL_ENV"
]
=
str
(
self
.
_venv
)
...
@@ -313,7 +319,11 @@ class Venv(object):
...
@@ -313,7 +319,11 @@ class Venv(object):
if
not
self
.
is_venv
():
if
not
self
.
is_venv
():
return
bin
return
bin
return
str
(
self
.
_bin_dir
/
bin
)
+
(
".exe"
if
self
.
_windows
else
""
)
bin_path
=
(
self
.
_bin_dir
/
bin
)
.
with_suffix
(
".exe"
if
self
.
_windows
else
""
)
if
not
bin_path
.
exists
():
return
bin
return
str
(
bin_path
)
def
is_venv
(
self
):
# type: () -> bool
def
is_venv
(
self
):
# type: () -> bool
return
self
.
_venv
is
not
None
return
self
.
_venv
is
not
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment