File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 55import pipes
66import shutil
77import subprocess
8+ import traceback
89
910from setuptools import setup , find_packages
1011from distutils import log
@@ -122,10 +123,19 @@ def list2cmdline(cmd_list):
122123def build_javascript_first (cls ):
123124 class Command (cls ):
124125 def run (self ):
125- for cmd , * args in map (str .split , ["npm install" , "npm run build" ]):
126- cmd_args = [shutil .which (cmd )] + args
127- log .info (list2cmdline (cmd_args ))
128- subprocess .check_call (cmd_args , cwd = os .path .join (root , "client" , "app" ))
126+ log .info ("Installing Javascript..." )
127+ try :
128+ js_dir = os .path .join (root , "client" , "app" )
129+ for cmd , * args in map (str .split , ["npm install" , "npm run build" ]):
130+ cmd_args = [shutil .which (cmd )] + args
131+ log .info (f"> { list2cmdline (cmd_args )} " )
132+ subprocess .check_call (cmd_args , cwd = js_dir )
133+ except Exception :
134+ log .error ("Failed to install Javascript" )
135+ log .error (traceback .format_exc ())
136+ raise
137+ else :
138+ log .info ("Successfully installed Javascript" )
129139 super ().run ()
130140
131141 return Command
You can’t perform that action at this time.
0 commit comments