peteboere / css-crush

CSS preprocessor.
http://the-echoplex.net/csscrush
MIT License
537 stars 51 forks source link

CLI Script wrong return code. #23

Closed ampaze closed 12 years ago

ampaze commented 12 years ago

Even when the "crushing" was successful, the return code is 1. So this code

if ( ! @file_put_contents( $output_file, $output ) ) {
    fwrite( $stdout, "Could not write to path '$output_file'\n" );
    if ( strpos( $output_file, '~' ) === 0 ) {
        fwrite( $stdout, "No tilde expansion\n" );
    }
    exit( 0 );
}

should be

if ( ! @file_put_contents( $output_file, $output ) ) {
    fwrite( $stdout, "Could not write to path '$output_file'\n" );
    if ( strpos( $output_file, '~' ) === 0 ) {
        fwrite( $stdout, "No tilde expansion\n" );
    }
} else {
    exit( 0 );
}
peteboere commented 12 years ago

Fixed in v1.5