Skip to content

Commit 774aa5d

Browse files
committed
ACP2E-1999: fix integration test failure
1 parent b994aab commit 774aa5d

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

app/code/Magento/Config/Console/Command/ConfigSetCommand.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
204204

205205
return Cli::RETURN_SUCCESS;
206206
} catch (\Exception $exception) {
207-
$this->localeEmulator->emulate(
208-
fn () => $output->writeln(sprintf('<error>%s</error>', __($exception->getMessage())))
209-
);
207+
$this->emulatedAreaProcessor->process(function () use ($exception, $output) {
208+
$this->localeEmulator->emulate(
209+
fn () => $output->writeln(sprintf('<error>%s</error>', __($exception->getMessage())))
210+
);
211+
});
210212
return Cli::RETURN_FAILURE;
211213
}
212214
}

app/code/Magento/Config/Console/Command/ConfigShowCommand.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
203203
$this->outputResult($output, $configValue, $this->inputPath);
204204
return Cli::RETURN_SUCCESS;
205205
} catch (\Exception $e) {
206-
$this->localeEmulator->emulate(
207-
fn () => $output->writeln(sprintf('<error>%s</error>', __($e->getMessage())))
208-
);
206+
$this->emulatedAreaProcessor->process(function () use ($e, $output) {
207+
$this->localeEmulator->emulate(
208+
fn () => $output->writeln(sprintf('<error>%s</error>', __($e->getMessage())))
209+
);
210+
});
209211
return Cli::RETURN_FAILURE;
210212
}
211213
}

0 commit comments

Comments
 (0)