Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions features/cli.feature
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,28 @@ Feature: `wp cli` tasks
"""
WP-CLI {UPDATE_VERSION}
"""

@github-api
Scenario: Update command works with PHP binary path containing spaces
Given an empty directory
And a new Phar with version "0.0.0"

# Create a directory with spaces and a PHP wrapper
When I run `mkdir -p "php with spaces/bin"`
And I run `cp "$(which php)" "php with spaces/bin/php"`
And I run `chmod +x "php with spaces/bin/php"`
Then the return code should be 0

# Test that the update command works when WP_CLI_PHP_USED has spaces
# This simulates the scenario where PHP binary path contains spaces
When I run `WP_CLI_PHP_USED="$PWD/php with spaces/bin/php" {PHAR_PATH} cli update --yes`
Then STDOUT should contain:
"""
sha512 hash verified:
"""
And STDOUT should contain:
"""
Success:
"""
And STDERR should be empty
And the return code should be 0
Loading