mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 07:50:24 +08:00
Extract method
This commit is contained in:
parent
b194f07a72
commit
d12106809f
@ -106,7 +106,7 @@ class InstallCommand extends Command
|
||||
|
||||
$this->enableBundledExtensions();
|
||||
} catch (Exception $e) {
|
||||
@unlink(base_path('../config.php'));
|
||||
@unlink($this->getConfigFile());
|
||||
|
||||
throw $e;
|
||||
}
|
||||
@ -139,7 +139,7 @@ class InstallCommand extends Command
|
||||
$this->info('Writing config');
|
||||
|
||||
file_put_contents(
|
||||
base_path('../config.php'),
|
||||
$this->getConfigFile(),
|
||||
'<?php return '.var_export($config, true).';'
|
||||
);
|
||||
}
|
||||
@ -252,4 +252,9 @@ class InstallCommand extends Command
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function getConfigFile()
|
||||
{
|
||||
return base_path('../config.php');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user