You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sys.exit("Error: {script_path_location} exists on $PATH but is not a symlink, skipping uninstall.\n".format(script_path_location=script_path_location))
137
+
sys.exit()
138
+
98
139
script_name=os.path.basename(sys.argv[0])
99
140
script_realpath=os.path.realpath(__file__)
100
141
script_on_path=False
@@ -112,47 +153,12 @@ def symlink(install):
112
153
ifscript_on_path:
113
154
sys.exit("\n{script_name} already on $PATH at {script_path_location}, skipping install.\n".format(script_name=script_name, script_path_location=script_path_location))
114
155
else:
115
-
print("\nCreate symlink for {script_name} on $PATH?".format(script_name=script_name))
sys.exit("Error: {script_path_location} exists on $PATH but is not a symlink, skipping uninstall.\n".format(script_path_location=script_path_location))
155
-
sys.exit()
161
+
unlink()
156
162
157
163
defbuild_source_list(args):
158
164
""" Constructs and returns list of source files
@@ -186,7 +192,7 @@ def build_source_list(args):
186
192
returnsource_files
187
193
188
194
defmain():
189
-
args=validate_args()
195
+
args=evaluate_args()
190
196
source_files=build_source_list(args)
191
197
time_script_started=datetime.now()
192
198
forfileinsource_files:
@@ -200,8 +206,5 @@ def main():
200
206
201
207
sys.exit("{date}: Finished after {duration}.\n".format(date=str(datetime.now()), duration=time_script_duration))
0 commit comments