@@ -81,9 +81,9 @@ def compile_file(self, source_path):
8181 # `cwd` is a directory containing `source_path`.
8282 # Ex: source_path = '1/2/3', full_source_path = '/abc/1/2/3' -> cwd = '/abc'
8383 cwd = os .path .normpath (os .path .join (full_source_path , * ([".." ] * len (source_path .split ("/" )))))
84- out , errors = utils .run_command (args , None , cwd = cwd )
84+ return_code , out , errors = utils .run_command (args , None , cwd = cwd )
8585
86- if errors :
86+ if return_code :
8787 if os .path .exists (full_output_path ):
8888 os .remove (full_output_path )
8989 raise exceptions .StaticCompilationError (errors )
@@ -104,8 +104,8 @@ def compile_source(self, source):
104104 if self .executable .endswith ("sass" ):
105105 args .append ("--scss" )
106106
107- out , errors = utils .run_command (args , source )
108- if errors :
107+ return_code , out , errors = utils .run_command (args , source )
108+ if return_code :
109109 raise exceptions .StaticCompilationError (errors )
110110
111111 return out
@@ -274,8 +274,8 @@ def compile_source(self, source):
274274 if self .executable .endswith ("scss" ):
275275 args .append ("--sass" )
276276
277- out , errors = utils .run_command (args , source )
278- if errors :
277+ return_code , out , errors = utils .run_command (args , source )
278+ if return_code :
279279 raise exceptions .StaticCompilationError (errors )
280280
281281 return out
0 commit comments