Commit d4599f2c by Loi Tran Committed by Steph Samson

Fix PATH being altered after installation even though choose not to (#787)

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

* Remove unuse updated list variable
parent 21ed84ed
......@@ -598,6 +598,9 @@ class Installer:
"""
Tries to update the $PATH automatically.
"""
if not self._modify_path:
return
if WINDOWS:
return self.add_to_windows_path()
......@@ -606,7 +609,6 @@ class Installer:
addition = "\n{}\n".format(export_string)
updated = []
profiles = self.get_unix_profiles()
for profile in profiles:
if not os.path.exists(profile):
......@@ -619,8 +621,6 @@ class Installer:
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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment