Add quick sanity check before before trying to use the $outDir
authorChad Horohoe <demon@users.mediawiki.org>
Fri, 8 Apr 2011 05:28:44 +0000 (05:28 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Fri, 8 Apr 2011 05:28:44 +0000 (05:28 +0000)
maintenance/hiphop/make

index 2aa0bd1..3e270f8 100755 (executable)
@@ -54,6 +54,11 @@ class MakeHipHop extends Maintenance {
                        ' --output-dir=' . wfEscapeShellArg( $outDir ) .
                        ' --log=3' );
 
+               # Sanity check, quickly make sure we've got an output directory
+               if( !is_dir( $outDir ) ) {
+                       $this->error( "No output directory", true );
+               }
+
                # Copy the generated C++ files into the source directory for cmake
                $iter = new RecursiveIteratorIterator( 
                        new RecursiveDirectoryIterator( $outDir ),