diff --git a/pipeline/compilers/__init__.py b/pipeline/compilers/__init__.py index f8fbe7b2..3eaa7ef9 100644 --- a/pipeline/compilers/__init__.py +++ b/pipeline/compilers/__init__.py @@ -40,7 +40,11 @@ def _compile(input_path): compiler.compile_file(infile, outfile, outdated=outdated, force=force) - return compiler.output_path(input_path, compiler.output_extension) + output_path = compiler.output_path(input_path, compiler.output_extension) + content = compiler.read_file(outfile) + compiler.save_file(output_path, content) + + return output_path else: return input_path @@ -149,3 +153,8 @@ def execute_command(self, command, cwd=None, stdout_captured=None): os.rename(stdout.name, os.path.join(cwd or os.curdir, stdout_captured)) else: os.remove(stdout.name) + + def read_file(self, path): + system_path = self.output_path(path, self.output_extension) + with open(system_path) as fid: + return fid.read()