Make compress_assets exit non-zero on errors #17

Merged
merged 1 commit into from Feb 20, 2012

Conversation

Projects
None yet
3 participants
Contributor

kumar303 commented Feb 20, 2012

r?

This will allow us to create a CI job to catch less compilation errors. I couldn't come up with an easy way to write an automated test for it but I installed it and manually tested in AMO.

@@ -79,7 +80,7 @@ def handle(self, **options):
# Concat all the files.
tmp_concatted = '%s.tmp' % concatted_file
- call("cat %s > %s" % (' '.join(files_all), tmp_concatted),
+ self._call("cat %s > %s" % (' '.join(files_all), tmp_concatted),
shell=True)
@davedash

davedash Feb 20, 2012

Contributor

nit: spaces

@@ -104,12 +105,21 @@ def handle(self, **options):
if not self.v and self.minify_skipped:
print "Unchanged files skipped for minification: %s" % (
self.minify_skipped)
+ if self.cmd_errors:
+ raise CommandError('one or more minify commands exited with a '
@davedash

davedash Feb 20, 2012

Contributor

nit: capitalize O

davedash pushed a commit that referenced this pull request Feb 20, 2012

Dave Dash
Merge pull request #17 from kumar303/exit-status
Make compress_assets exit non-zero on errors

@davedash davedash merged commit b79338a into jsocol:master Feb 20, 2012

Owner

jsocol commented Feb 21, 2012

Thanks guys! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment