Use path.config binding in "october:env" to allow unit test to work

This commit is contained in:
Ben Thomson 2020-09-09 12:38:48 +08:00
parent 561815cac1
commit b251867f56
No known key found for this signature in database
GPG Key ID: 8BDB18DD0909BE22

View File

@ -1,5 +1,6 @@
<?php namespace System\Console;
use App;
use Illuminate\Console\Command;
/**
@ -327,7 +328,7 @@ class OctoberEnv extends Command
*/
protected function writeToConfigFile($content)
{
file_put_contents(config_path($this->config . '.php'), $content);
file_put_contents(rtrim(App::make('path.config'), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $this->config . '.php', $content);
}
/**
@ -335,7 +336,7 @@ class OctoberEnv extends Command
*/
protected function lines()
{
return file(config_path($this->config . '.php'));
return file(rtrim(App::make('path.config'), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $this->config . '.php');
}
/**