[Solar-svn] Revision 2785
pmjones at solarphp.com
pmjones at solarphp.com
Mon Sep 24 11:23:31 CDT 2007
solar cli "binary": now attempts to use a default config file, and prints out the config file path at invocation time.
Modified: trunk/bin/solar
===================================================================
--- trunk/bin/solar 2007-09-24 15:29:58 UTC (rev 2784)
+++ trunk/bin/solar 2007-09-24 16:23:31 UTC (rev 2785)
@@ -29,15 +29,15 @@
}
/**
- * Do we have a preferred config file?
- * @todo Look for PHP_SOLAR_CONFIG_PATH
+ * Find the config file, if any
*/
-
-$config = false;
-/**
- * Look for a config file preference override
- */
+// default config file
+if (! empty($_SERVER['PHP_SOLAR_CONFIG_PATH'])) {
+ $config = $_SERVER['PHP_SOLAR_CONFIG_PATH'];
+} else {
+ $config = false;
+}
// manually look for a --config (config file) argument
$argv = empty($_SERVER['argv']) ? array() : $_SERVER['argv'];
@@ -69,6 +69,9 @@
exit(-1);
}
+$config = realpath($config);
+echo "Using config file '$config'.\n";
+
/**
* Main
*/
More information about the Solar-svn
mailing list