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
d27ed443
Unverified
Commit
d27ed443
authored
Nov 05, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PATH update when uninstalling for UNIX systems
parent
1e0bd8ea
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
1 deletions
+28
-1
get-poetry.py
+28
-1
No files found.
get-poetry.py
View file @
d27ed443
...
@@ -690,7 +690,34 @@ class Installer:
...
@@ -690,7 +690,34 @@ class Installer:
self
.
set_windows_path_var
(
path
)
self
.
set_windows_path_var
(
path
)
def
remove_from_unix_path
(
self
):
def
remove_from_unix_path
(
self
):
pass
# Updating any profile we can on UNIX systems
export_string
=
self
.
get_export_string
()
addition
=
"{}
\n
"
.
format
(
export_string
)
profiles
=
self
.
get_unix_profiles
()
for
profile
in
profiles
:
if
not
os
.
path
.
exists
(
profile
):
continue
with
open
(
profile
,
"r"
)
as
f
:
content
=
f
.
readlines
()
if
addition
not
in
content
:
continue
new_content
=
[]
for
line
in
content
:
if
line
==
addition
:
if
new_content
and
not
new_content
[
-
1
]
.
strip
():
new_content
=
new_content
[:
-
1
]
continue
new_content
.
append
(
line
)
with
open
(
profile
,
"w"
)
as
f
:
f
.
writelines
(
new_content
)
def
get_export_string
(
self
):
def
get_export_string
(
self
):
path
=
POETRY_BIN
.
replace
(
os
.
getenv
(
"HOME"
,
""
),
"$HOME"
)
path
=
POETRY_BIN
.
replace
(
os
.
getenv
(
"HOME"
,
""
),
"$HOME"
)
...
...
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