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
7e7d75bc
Unverified
Commit
7e7d75bc
authored
Jul 30, 2021
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix system env detection
parent
89575f6f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
poetry/utils/env.py
+4
-4
No files found.
poetry/utils/env.py
View file @
7e7d75bc
...
@@ -590,7 +590,7 @@ class EnvManager:
...
@@ -590,7 +590,7 @@ class EnvManager:
create_venv
=
self
.
_poetry
.
config
.
get
(
"virtualenvs.create"
,
True
)
create_venv
=
self
.
_poetry
.
config
.
get
(
"virtualenvs.create"
,
True
)
if
not
create_venv
:
if
not
create_venv
:
return
SystemEnv
(
Path
(
sys
.
prefix
)
)
return
self
.
get_system_env
(
)
venv_path
=
self
.
_poetry
.
config
.
get
(
"virtualenvs.path"
)
venv_path
=
self
.
_poetry
.
config
.
get
(
"virtualenvs.path"
)
if
venv_path
is
None
:
if
venv_path
is
None
:
...
@@ -603,7 +603,7 @@ class EnvManager:
...
@@ -603,7 +603,7 @@ class EnvManager:
venv
=
venv_path
/
name
venv
=
venv_path
/
name
if
not
venv
.
exists
():
if
not
venv
.
exists
():
return
SystemEnv
(
Path
(
sys
.
prefix
)
)
return
self
.
get_system_env
(
)
return
VirtualEnv
(
venv
)
return
VirtualEnv
(
venv
)
...
@@ -872,7 +872,7 @@ class EnvManager:
...
@@ -872,7 +872,7 @@ class EnvManager:
"</>"
"</>"
)
)
return
SystemEnv
(
Path
(
sys
.
prefix
)
)
return
self
.
get_system_env
(
)
io
.
write_line
(
io
.
write_line
(
"Creating virtualenv <c1>{}</> in {}"
.
format
(
name
,
str
(
venv_path
))
"Creating virtualenv <c1>{}</> in {}"
.
format
(
name
,
str
(
venv_path
))
...
@@ -1020,7 +1020,7 @@ class EnvManager:
...
@@ -1020,7 +1020,7 @@ class EnvManager:
else
:
else
:
prefix
=
base_prefix
prefix
=
base_prefix
return
SystemEnv
(
prefix
,
base_prefix
)
return
SystemEnv
(
prefix
)
@classmethod
@classmethod
def
get_base_prefix
(
cls
)
->
Path
:
def
get_base_prefix
(
cls
)
->
Path
:
...
...
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