File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -982,10 +982,14 @@ def get(self, request):
982
982
tool_name = tool_name .split ('/' )[- 1 ]
983
983
update_command = 'cd /usr/src/github/' + tool_name + ' && git pull && cd -'
984
984
985
- run_command (update_command )
986
- run_command .apply_async (args = (update_command ,))
987
- return Response ({'status' : True , 'message' : tool .name + ' updated successfully.' })
988
-
985
+
986
+ try :
987
+ run_command (update_command , shell = True )
988
+ run_command .apply_async (args = [update_command ], kwargs = {'shell' : True })
989
+ return Response ({'status' : True , 'message' : tool .name + ' updated successfully.' })
990
+ except Exception as e :
991
+ logger .error (str (e ))
992
+ return Response ({'status' : False , 'message' : str (e )})
989
993
990
994
class GetExternalToolCurrentVersion (APIView ):
991
995
def get (self , request ):
You can’t perform that action at this time.
0 commit comments