@@ -81,9 +81,9 @@ def compile_file(self, source_path):
81
81
# `cwd` is a directory containing `source_path`.
82
82
# Ex: source_path = '1/2/3', full_source_path = '/abc/1/2/3' -> cwd = '/abc'
83
83
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 )
85
85
86
- if errors :
86
+ if return_code :
87
87
if os .path .exists (full_output_path ):
88
88
os .remove (full_output_path )
89
89
raise exceptions .StaticCompilationError (errors )
@@ -104,8 +104,8 @@ def compile_source(self, source):
104
104
if self .executable .endswith ("sass" ):
105
105
args .append ("--scss" )
106
106
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 :
109
109
raise exceptions .StaticCompilationError (errors )
110
110
111
111
return out
@@ -274,8 +274,8 @@ def compile_source(self, source):
274
274
if self .executable .endswith ("scss" ):
275
275
args .append ("--sass" )
276
276
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 :
279
279
raise exceptions .StaticCompilationError (errors )
280
280
281
281
return out
0 commit comments