File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -957,6 +957,10 @@ def main():
957
957
958
958
result = {"start" : now ()}
959
959
960
+ git_user = None
961
+ if len (sys .argv ) == 2 :
962
+ git_user = sys .argv [1 ]
963
+
960
964
with urllib .request .urlopen ("https://download.tinkerforge.com/latest_versions.txt" ) as f :
961
965
latest_versions = f .read ().decode ("utf-8" )
962
966
@@ -1150,9 +1154,11 @@ def main():
1150
1154
1151
1155
print ("Checking if EVSE was tested..." )
1152
1156
if not exists_evse_test_report (result ["evse_uid" ]):
1157
+ if git_user is None :
1158
+ fatal_error ("No test report found for EVSE {} and git username is unknown. Please pull the wallbox git." .format (result ["evse_uid" ]))
1153
1159
print ("No test report found. Checking for new test reports..." )
1154
1160
with ChangedDirectory (os .path .join (".." , ".." , "wallbox" )):
1155
- run (["git " , " pull" ])
1161
+ run (["su " , git_user , "-c" , "git pull" ])
1156
1162
if not exists_evse_test_report (result ["evse_uid" ]):
1157
1163
fatal_error ("No test report found for EVSE {}." .format (result ["evse_uid" ]))
1158
1164
You can’t perform that action at this time.
0 commit comments