Skip to content

Commit 7fc0b9e

Browse files
minor symfony#58784 [Process] normalize paths to avoid failures if a path is referenced by different names (xabbuh)
This PR was merged into the 5.4 branch. Discussion ---------- [Process] normalize paths to avoid failures if a path is referenced by different names | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT see https://github.com/symfony/symfony/actions/runs/11702544203/job/32590943777?pr=58721#step:8:1188 Commits ------- cc769ea normalize paths to avoid failures if a path is referenced by different names
2 parents ceef101 + cc769ea commit 7fc0b9e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Symfony/Component/Process/Tests/ExecutableFinderTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,16 @@ public function testFindBatchExecutableOnWindows()
123123
$this->markTestSkipped('Can be only tested on windows');
124124
}
125125

126-
$target = str_replace('.tmp', '_tmp', tempnam(sys_get_temp_dir(), 'example-windows-executable'));
126+
$tempDir = realpath(sys_get_temp_dir());
127+
$target = str_replace('.tmp', '_tmp', tempnam($tempDir, 'example-windows-executable'));
127128

128129
try {
129130
touch($target);
130131
touch($target.'.BAT');
131132

132133
$this->assertFalse(is_executable($target));
133134

134-
putenv('PATH='.sys_get_temp_dir());
135+
putenv('PATH='.$tempDir);
135136

136137
$finder = new ExecutableFinder();
137138
$result = $finder->find(basename($target), false);

0 commit comments

Comments
 (0)