Skip to content

Commit 69101ef

Browse files
committed
MQE-1626: bin/mftf run:manifest
- Add check for input path exists
1 parent 11e69d6 commit 69101ef

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Magento/FunctionalTestingFramework/Console/RunManifestCommand.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
namespace Magento\FunctionalTestingFramework\Console;
99

10+
use Magento\FunctionalTestingFramework\Exceptions\TestFrameworkException;
1011
use Symfony\Component\Console\Command\Command;
1112
use Symfony\Component\Console\Input\InputArgument;
1213
use Symfony\Component\Console\Input\InputInterface;
@@ -47,11 +48,18 @@ protected function configure()
4748
*
4849
* @param InputInterface $input
4950
* @param OutputInterface $output
51+
* @throws TestFrameworkException
5052
* @return integer
5153
*/
5254
protected function execute(InputInterface $input, OutputInterface $output): int
5355
{
54-
$manifestFile = file($input->getArgument("path"), FILE_IGNORE_NEW_LINES);
56+
$path = $input->getArgument("path");
57+
58+
if (!file_exists($path)) {
59+
throw new TestFrameworkException("Could not find file $path. Check the path and try again.");
60+
}
61+
62+
$manifestFile = file($path, FILE_IGNORE_NEW_LINES);
5563

5664
// Delete the Codeception failed file just in case it exists from any previous test runs
5765
$this->deleteFailedFile();

0 commit comments

Comments
 (0)