Skip to content

Commit

Permalink
Fix PATH being altered after installation even though choose not to (p…
Browse files Browse the repository at this point in the history
…ython-poetry#787)

* Fix PATH being altered after installation even though choose not to

* Remove unuse updated list variable
  • Loading branch information
tdloi authored and kasteph committed Oct 12, 2019
1 parent 21ed84e commit d4599f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions get-poetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,9 @@ def update_path(self):
"""
Tries to update the $PATH automatically.
"""
if not self._modify_path:
return

if WINDOWS:
return self.add_to_windows_path()

Expand All @@ -606,7 +609,6 @@ def update_path(self):

addition = "\n{}\n".format(export_string)

updated = []
profiles = self.get_unix_profiles()
for profile in profiles:
if not os.path.exists(profile):
Expand All @@ -619,8 +621,6 @@ def update_path(self):
with open(profile, "a") as f:
f.write(u(addition))

updated.append(os.path.relpath(profile, HOME))

def add_to_windows_path(self):
try:
old_path = self.get_windows_path_var()
Expand Down

0 comments on commit d4599f2

Please sign in to comment.