@@ -63,7 +63,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
63
63
64
64
$ arguments = $ input ->getArguments ();
65
65
if ($ arguments ['input ' ] === null ) {
66
- $ guessedInput = $ this ->guessInput (self ::DEFAULT_INPUT_DIRECTORY , $ output );
66
+ $ guessedInput = $ this ->guessInput (self ::DEFAULT_INPUT_DIRECTORY , $ output, false );
67
67
} else {
68
68
$ guessedInput = [];
69
69
}
@@ -175,7 +175,7 @@ public function renderSingleLocalization(string $availableLocalization, array $b
175
175
}
176
176
$ output ->writeln (sprintf ('<info>Trying to render %s ...</info> ' , $ availableLocalization ));
177
177
178
- $ guessInput = $ this ->guessInput ($ localInputDirectives ['input-file ' ], $ output );
178
+ $ guessInput = $ this ->guessInput ($ localInputDirectives ['input-file ' ], $ output, true );
179
179
if ($ guessInput === []) {
180
180
$ output ->writeln ('<info>Skipping, no entrypoint for localization found.</info> ' );
181
181
return Command::SUCCESS ;
@@ -294,7 +294,7 @@ public function mergeApplicationDefinition(bool $mergeArgs = true): void
294
294
}
295
295
296
296
/** @return array<string, string> */
297
- private function guessInput (string $ inputBaseDirectory , OutputInterface $ output ): array
297
+ private function guessInput (string $ inputBaseDirectory , OutputInterface $ output, bool $ isAbsoluteDirectory = false ): array
298
298
{
299
299
$ currentDirectory = getcwd ();
300
300
if ($ currentDirectory === false ) {
@@ -305,7 +305,13 @@ private function guessInput(string $inputBaseDirectory, OutputInterface $output)
305
305
return [];
306
306
}
307
307
308
- $ inputDirectory = $ currentDirectory . DIRECTORY_SEPARATOR . $ inputBaseDirectory ;
308
+ if ($ isAbsoluteDirectory ) {
309
+ // Directory is already fully passed, and not a sub-directory (i.e. for localizations)
310
+ $ inputDirectory = $ inputBaseDirectory ;
311
+ } else {
312
+ // Directory needs to be checked within our working space (i.e. /project in container)
313
+ $ inputDirectory = $ currentDirectory . DIRECTORY_SEPARATOR . $ inputBaseDirectory ;
314
+ }
309
315
310
316
if (is_dir ($ inputDirectory )) {
311
317
if ($ output ->isDebug ()) {
0 commit comments