Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» support APPLICATION_PATH environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
QWp6t committed Jun 25, 2023
1 parent 220d9e9 commit fefcb21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,6 @@ RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli
&& curl -O https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash \
&& mv wp-completion.bash /etc/bash_completion.d/wp-completion.bash

USER vscode
ENV APPLICATION_PATH=/roots/app

USER vscode
3 changes: 3 additions & 0 deletions bin/acorn
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
if (! is_file($autoload_path = dirname(__DIR__, 4) . '/vendor/autoload.php')) {
$autoload_path = dirname(__DIR__) . '/vendor/autoload.php';
}
if (filter_input(INPUT_ENV, 'APPLICATION_PATH')) {
$autoload_path = filter_input(INPUT_ENV, 'APPLICATION_PATH') . '/vendor/autoload.php';
}
require_once $autoload_path;

$composer_path = (new Roots\Acorn\Filesystem\Filesystem)->closest(dirname($autoload_path, 2), 'composer.json');
Expand Down

0 comments on commit fefcb21

Please sign in to comment.