Selaa lähdekoodia

occ command can only be called from ownCloud root directory

* this changes into the ownCloud root directory and then should run just fine
* avoids weird error messages that are caused by this
tags/v9.0beta1
Morris Jobke 8 vuotta sitten
vanhempi
commit
b8ceae68d5
1 muutettua tiedostoa jossa 10 lisäystä ja 0 poistoa
  1. 10
    0
      console.php

+ 10
- 0
console.php Näytä tiedosto

@@ -64,6 +64,16 @@ try {
}
}

$oldWorkingDir = getcwd();
if ($oldWorkingDir === false) {
echo "This script can be run from the ownCloud root directory only." . PHP_EOL;
echo "Can't determine current working dir - the script will continue to work but be aware of the above fact." . PHP_EOL;
} else if ($oldWorkingDir !== __DIR__ && !chdir(__DIR__)) {
echo "This script can be run from the ownCloud root directory only." . PHP_EOL;
echo "Can't change to ownCloud root diretory." . PHP_EOL;
exit(1);
}

$application = new Application(\OC::$server->getConfig());
$application->loadCommands(new ConsoleOutput());
$application->run();

Loading…
Peruuta
Tallenna