On 24/08/2009, at 12:19 PM, dan nessett wrote: > --- On Sun, 8/23/09, Aryeh Gregor <[email protected]> > wrote: > >> If they can run commands on the command line, then they can >> use >> environment variables. If they can't, then your >> suggestion doesn't >> help. >> >>> If there are administrators who can execute command >> lines, but cannot set environmental variables (e.g., they >> are confined to use a special shell) >> >> There aren't. That would make no sense. > > Thanks for clarifying the situation. Given this information I > suggest changing all code in command line utilities of the form: > > $IP = getenv( 'MW_INSTALL_PATH' ); > if ( $IP === false ) { > $IP = dirname(__FILE__).'/../..'; > } > > to: > > $IP = getenv( 'MW_INSTALL_PATH' ); > if ( $IP === false ) { > echo "Error. The environmental variable MW_INSTALL_PATH must be set > to the root of the MW distribution. Exiting.\n"; > die(); > } > > This would eliminate file position dependent code from the command > line utilities, making them easier to maintain (i.e., they can be > moved in the distribution without breaking them).
Yes, if you change this, they will not break if they are moved within the distribution. Instead, they will be broken regardless of whether or not they have been moved. That's just plain stupid. -- Andrew Garrett [email protected] http://werdn.us/ _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
