You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are you working on the Joomlatools Vagrant box: no
Describe the problem:
The joomlatools-console determines it's home directory by using the pre-defined $HOME variable, which is okay in most cases.
In our case, we're running the console in a managed-hosting environment, where the $HOME-directory is NOT writable, which results in an error when running the joomla command.
It would be great, if there is a way to configure the home directory for joomlatools-console by using a variable equivalent to COMPOSER_HOME. Maybe JOOMLATOOLS_CONSOLE_HOME?
I'm thinking about adjusting the getConsoleHome()-function like that:
/** * Get the home directory path * * @return string Path to the Joomlatools Console home directory */publicfunctiongetConsoleHome()
{
$home = getenv('HOME');
if (getenv("JOOMLATOOLS_CONSOLE_HOME") !== "") {
$home = getenv("JOOMLATOOLS_CONSOLE_HOME");
}
returnrtrim($home, '/') . '/.joomlatools/console';
}
Doing it that way we should also ensure backwards-comaptibility.
Since I'm not very familiar with best-practice-php-programming I'm open for suggestions.
Steps to reproduce:
Install joomlatools-console to a managed-hosting environment, e.g. mittwald
Run any command
Observed Results:
Error: /path/to/home is not writable
Expected Results:
That it's possible to override the default home for joomlatools-console.
The text was updated successfully, but these errors were encountered:
@Hermsi1337 This is a great suggestion and would make a lot of sense to be able to overwrite the default HOME directory. The fix you suggest should work great! Feel free to send that in as a PR.
Describe your environment
Describe the problem:
The
joomlatools
-console determines it's home directory by using the pre-defined$HOME
variable, which is okay in most cases.In our case, we're running the console in a managed-hosting environment, where the
$HOME
-directory is NOT writable, which results in an error when running thejoomla
command.It would be great, if there is a way to configure the home directory for
joomlatools
-console by using a variable equivalent toCOMPOSER_HOME
. MaybeJOOMLATOOLS_CONSOLE_HOME
?I'm thinking about adjusting the
getConsoleHome()
-function like that:Doing it that way we should also ensure backwards-comaptibility.
Since I'm not very familiar with best-practice-php-programming I'm open for suggestions.
Steps to reproduce:
joomlatools
-console to a managed-hosting environment, e.g. mittwaldObserved Results:
Expected Results:
joomlatools
-console.The text was updated successfully, but these errors were encountered: