Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.6] Fix path whitespace edge case in tests #19

Merged
merged 3 commits into from
Mar 18, 2024

Conversation

divinity76
Copy link

if the file has a space in the path, the command would not account for that and generate an invalid invocation. for example if the path was /home/hans henrik/wrench/tests/Test/ServerTestHelper.php the command would previously fail.

if the file has a space in the path, the command would not account for that and generate an invalid invocation. for example if the path was
/home/hans henrik/wrench/tests/Test/ServerTestHelper.php
the command would previously fail.
@GrahamCampbell
Copy link
Member

Thanks for the PR. I'm not sure that will work properly on Windows, however.

@divinity76
Copy link
Author

@GrahamCampbell it's the correct approach on Windows as well (but escapeshellarg() is not foolproof on Windows ), but it doesn't really matter in this specific file, tests/Test/ServerTestHelper.php needs a major overhaul to work on Windows, it currently contains stuff like

                \exec('ps -ao pid,ppid | col | tail -n +2 | grep \' '
(...)
            $this->getCommand(),
            [
                0 => ['file', '/dev/null', 'r'],
 (...)
 /usr/bin/env

@GrahamCampbell GrahamCampbell changed the title fix path whitespace edge case [1.6] Fix path whitespace edge case in tests Mar 18, 2024
@GrahamCampbell GrahamCampbell changed the base branch from 1.5 to 1.6 March 18, 2024 08:59
@GrahamCampbell GrahamCampbell merged commit 5b9a4d8 into chrome-php:1.6 Mar 18, 2024
6 checks passed
@GrahamCampbell
Copy link
Member

Great, thanks for being on top of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants