Replace NN_ROOT with base_path()

This commit is contained in:
DariusIII
2020-03-29 14:51:21 +02:00
parent d3c6f22579
commit 2b858100b3
6 changed files with 8 additions and 7 deletions
+3 -2
View File
@@ -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;
+1 -1
View File
@@ -49,7 +49,7 @@ class Git extends GitRepository
$defaults = [
'create' => false,
'initialise' => false,
'filepath' => NN_ROOT,
'filepath' => base_path().'/',
];
$options += $defaults;
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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');
+1 -1
View File
@@ -62,7 +62,7 @@ class Git
'dev',
],
],
'filepath' => NN_ROOT,
'filepath' => base_path().'/',
];
$config += $defaults;
+1 -1
View File
@@ -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';