Merge "objectcache: add "staleTTL" into WANObjectCache::getWithSetCallback()"
[lhc/web/wiklou.git] / maintenance / hhvm / makeRepo.php
index a0fe381..f77f5b9 100644 (file)
@@ -95,9 +95,9 @@ class HHVMMakeRepo extends Maintenance {
                print "Found " . count( $files ) . " files in " .
                        count( $dirs ) . " directories\n";
 
-               $tmpDir = wfTempDir() . '/mw-make-repo' . mt_rand( 0, 1<<31 );
+               $tmpDir = wfTempDir() . '/mw-make-repo' . mt_rand( 0, 1 << 31 );
                if ( !mkdir( $tmpDir ) ) {
-                       $this->error( 'Unable to create temporary directory', 1 );
+                       $this->fatalError( 'Unable to create temporary directory' );
                }
                file_put_contents( "$tmpDir/file-list", implode( "\n", $files ) );
 
@@ -106,7 +106,7 @@ class HHVMMakeRepo extends Maintenance {
                $cmd = wfEscapeShellArg(
                        $hhvm,
                        '--hphp',
-                   '--target', 'hhbc',
+                       '--target', 'hhbc',
                        '--format', 'binary',
                        '--force', '1',
                        '--keep-tempdir', '1',
@@ -119,11 +119,11 @@ class HHVMMakeRepo extends Maintenance {
                passthru( $cmd, $ret );
                if ( $ret ) {
                        $this->cleanupTemp( $tmpDir );
-                       $this->error( "Error: HHVM returned error code $ret", 1 );
+                       $this->fatalError( "Error: HHVM returned error code $ret" );
                }
                if ( !rename( "$tmpDir/hhvm.hhbc", $this->getOption( 'output' ) ) ) {
                        $this->cleanupTemp( $tmpDir );
-                       $this->error( "Error: unable to rename output file", 1 );
+                       $this->fatalError( "Error: unable to rename output file" );
                }
                $this->cleanupTemp( $tmpDir );
                return 0;