diff --git a/hyde b/hyde index 0d3374c6..d799544e 100644 --- a/hyde +++ b/hyde @@ -13,16 +13,16 @@ * - Proxy mode: Defers to the Hyde installation in the current directory. */ +// If this is being run from the source code, run in artisan mode +if (getcwd() === __DIR__ || getcwd() === __FILE__) { + return require_once __DIR__ . '/bin/hyde'; +} + // Define working directory define('HYDE_WORKING_DIR', getcwd()); // Determine the mode to run in define('HYDE_MODE', (function () { - // If this is being run from the source code, run in artisan mode - if (HYDE_WORKING_DIR === __DIR__ || HYDE_WORKING_DIR === __FILE__) { - return 'artisan'; - } - // If the current directory contains a Hyde binary, run in proxy mode if (file_exists(HYDE_WORKING_DIR . '/hyde')) { return 'proxy'; @@ -68,5 +68,4 @@ return match (HYDE_MODE) { $kernel->terminate($input, $status); exit($status); })(), - 'artisan' => require_once __DIR__ . '/bin/hyde' };