Skip to content

Commit d056306

Browse files
committed
Resolve path after checking it leads to an existing file
Running the tool without creating a guides.xml is a valid scenario, and should be supported. This means realpath() may return false, which is not a valid input for is_file(). Fixes #824
1 parent 3a54583 commit d056306

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/guides-cli/bin/guides

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ if ($input->hasParameterOption('-vvv', true)) {
4040

4141
$containerFactory = new ContainerFactory([new ApplicationExtension()]);
4242

43-
$projectConfig = realpath($vendorDir . '/../guides.xml');
43+
$projectConfig = $vendorDir . '/../guides.xml';
4444
if (is_file($projectConfig)) {
45+
$projectConfig = realpath($vendorDir . '/../guides.xml');
4546
if ($verbosity === 3) {
4647
echo 'Loading guides.xml from ' . $projectConfig . PHP_EOL;
4748
}

0 commit comments

Comments
 (0)