Skip to content

Commit 7188513

Browse files
authored
Merge pull request #110 from diglin/bugfix/wrong-path-env
BUGFIX: load correctly .env file from current working directory
2 parents de4b3a3 + f0683db commit 7188513

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)