Skip to content

Commit f0683db

Browse files
committed
BUGFIX: load correctly .env file from current working directory
1 parent de4b3a3 commit f0683db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Console/Command/PipelineRunCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
4141

4242
$dotenv = new Dotenv();
4343
$dotenv->usePutenv();
44-
if (file_exists($file = \dirname($cwd).'/.env')) {
44+
45+
if (file_exists($file = $cwd . '/.env')) {
4546
$dotenv->loadEnv($file);
4647
}
47-
if (file_exists($file = $cwd.'/'.$input->getArgument('path').'/.env')) {
48+
if (file_exists($file = $cwd . '/' . $input->getArgument('path') . '/.env')) {
4849
$dotenv->loadEnv($file);
4950
}
5051

0 commit comments

Comments
 (0)