File tree Expand file tree Collapse file tree 2 files changed +829
-0
lines changed
vendor/wp-cli/wp-cli/php/commands/src Expand file tree Collapse file tree 2 files changed +829
-0
lines changed Original file line number Diff line number Diff line change @@ -173,3 +173,27 @@ Feature: `wp cli` tasks
173173 """
174174 WP-CLI {UPDATE_VERSION}
175175 """
176+
177+ @github-api
178+ Scenario: Update command works with PHP binary path containing spaces
179+ Given an empty directory
180+ And a new Phar with version "0.0.0"
181+
182+ # Create a directory with spaces and a PHP wrapper
183+ When I run `mkdir -p "php with spaces/bin"`
184+ And I run `printf '#!/bin/bash\nexec php "$@"' > "php with spaces/bin/php" `
185+ And I run `chmod +x "php with spaces/bin/php" `
186+ Then the return code should be 0
187+
188+ # Test that the update command works when PHP_BINARY has spaces
189+ When I run `PHP_BINARY="$PWD/php with spaces/bin/php" "$PWD/php with spaces/bin/php" {PHAR_PATH} cli update --yes`
190+ Then STDOUT should contain:
191+ """
192+ sha512 hash verified:
193+ """
194+ And STDOUT should contain:
195+ """
196+ Success:
197+ """
198+ And STDERR should be empty
199+ And the return code should be 0
You can’t perform that action at this time.
0 commit comments