r85660 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85659‎ | r85660 | r85661 >
Date:05:28, 8 April 2011
Author:demon
Status:ok (Comments)
Tags:
Comment:
Add quick sanity check before before trying to use the $outDir
Modified paths:
  • /trunk/phase3/maintenance/hiphop/make (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/hiphop/make
@@ -54,6 +54,11 @@
5555 ' --output-dir=' . wfEscapeShellArg( $outDir ) .
5656 ' --log=3' );
5757
 58+ # Sanity check, quickly make sure we've got an output directory
 59+ if( !is_dir( $outDir ) ) {
 60+ $this->error( "No output directory", true );
 61+ }
 62+
5863 # Copy the generated C++ files into the source directory for cmake
5964 $iter = new RecursiveIteratorIterator(
6065 new RecursiveDirectoryIterator( $outDir ),

Comments

#Comment by Nikerabbit (talk | contribs)   13:23, 8 April 2011

I'd imagine this error message would be pretty annoying if you had no idea what is going on.

#Comment by 😂 (talk | contribs)   07:42, 9 April 2011

I was getting it when hphp wasn't in my include path and the calls to it above were failing. Yeah better error handling would be nice here.

Status & tagging log