mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 17:01:16 +00:00
Replace NN_ROOT with base_path()
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -49,7 +49,7 @@ class Git extends GitRepository
|
||||
$defaults = [
|
||||
'create' => false,
|
||||
'initialise' => false,
|
||||
'filepath' => NN_ROOT,
|
||||
'filepath' => base_path().'/',
|
||||
];
|
||||
$options += $defaults;
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -62,7 +62,7 @@ class Git
|
||||
'dev',
|
||||
],
|
||||
],
|
||||
'filepath' => NN_ROOT,
|
||||
'filepath' => base_path().'/',
|
||||
];
|
||||
|
||||
$config += $defaults;
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user