diff --git a/Blacklight/db/PreDb.php b/Blacklight/db/PreDb.php index 7698fa843..7934c4caa 100755 --- a/Blacklight/db/PreDb.php +++ b/Blacklight/db/PreDb.php @@ -212,15 +212,16 @@ SQL_EXPORT; } /** - * @param null $settings + * @param null $settings * @param array $options * * @return mixed|null + * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ public function progress($settings = null, array $options = []) { $defaults = [ - 'path' => NN_ROOT.'cli'.DS.'data'.DS.'predb_progress.txt', + 'path' => base_path().'/cli/data/predb_progress.txt', 'read' => true, ]; $options += $defaults; diff --git a/Blacklight/utility/Git.php b/Blacklight/utility/Git.php index 855269cf2..4910a25a9 100755 --- a/Blacklight/utility/Git.php +++ b/Blacklight/utility/Git.php @@ -49,7 +49,7 @@ class Git extends GitRepository $defaults = [ 'create' => false, 'initialise' => false, - 'filepath' => NN_ROOT, + 'filepath' => base_path().'/', ]; $options += $defaults; diff --git a/Blacklight/utility/Utility.php b/Blacklight/utility/Utility.php index 0ed7016f9..69e02e822 100755 --- a/Blacklight/utility/Utility.php +++ b/Blacklight/utility/Utility.php @@ -255,7 +255,7 @@ class Utility \define('NN_COVERS', Str::finish($path, '/')); break; case $path !== '' && $path[0] !== '/' && $path[1] !== ':' && $path[0] !== '\\': - \define('NN_COVERS', realpath(NN_ROOT.Str::finish($path, '/'))); + \define('NN_COVERS', realpath(base_path().Str::finish($path, '/'))); break; case empty($path): // Default to resources location. default: diff --git a/app/Console/Commands/InstallNntmux.php b/app/Console/Commands/InstallNntmux.php index e1edf711c..f78d78a6e 100644 --- a/app/Console/Commands/InstallNntmux.php +++ b/app/Console/Commands/InstallNntmux.php @@ -48,7 +48,7 @@ class InstallNntmux extends Command $error = false; if ($this->confirm('Are you sure you want to install NNTmux? This will wipe your database!!')) { - if (file_exists(NN_ROOT.'_install/install.lock')) { + if (file_exists(base_path().'/_install/install.lock')) { if ($this->confirm('Do you want to remove install.lock file so you can continue with install?')) { $this->info('Removing install.lock file so we can continue with install process'); $remove = new Process('rm _install/install.lock'); diff --git a/app/Extensions/util/Git.php b/app/Extensions/util/Git.php index 7aed8e05e..b8459416a 100644 --- a/app/Extensions/util/Git.php +++ b/app/Extensions/util/Git.php @@ -62,7 +62,7 @@ class Git 'dev', ], ], - 'filepath' => NN_ROOT, + 'filepath' => base_path().'/', ]; $config += $defaults; diff --git a/tests/Install/InstallTest.php b/tests/Install/InstallTest.php index a16a666b1..6f000967e 100644 --- a/tests/Install/InstallTest.php +++ b/tests/Install/InstallTest.php @@ -21,7 +21,7 @@ class InstallTest extends \PHPUnit\Framework\TestCase { public function testFullInstall() { - passthru('php '.NN_ROOT.'artisan migrate:fresh --seed'); + passthru('php '.base_path().'/artisan migrate:fresh --seed'); $message = 'NNTmux installation completed successfully';