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

Sake script failure when PHP binary path contains spaces in SilverStripe 5.2.2 #11289

Closed
2 tasks done
digitall-it opened this issue Jun 22, 2024 · 1 comment
Closed
2 tasks done
Assignees

Comments

@digitall-it
Copy link
Contributor

digitall-it commented Jun 22, 2024

Module version(s) affected

5.2.2

Description

When executing the 'vendor/bin/sake' command in a SilverStripe 5.2.2 environment where the PHP binary path includes spaces, the script fails. This prevents the build process from completing successfully.

How to reproduce

  1. Install PHP in a directory with spaces in its path.
  2. Configure the environment to use this PHP binary.
  3. Run 'vendor/bin/sake build' from the terminal.
  4. Observe the failure due to spaces in the PHP path in row 45, and when corrected, on row 121

Possible Solution

Quote all paths used in shell commands within the script to properly handle spaces. For example, changing the script to use "$php" instead of $php when invoking the PHP binary.

Additional Context

This issue arises particularly on systems where default installation paths for software like PHP may contain spaces, such as within 'Program Files' on Windows or 'Application Support' on Mac.

Validations

  • Check that there isn't already an issue that reports the same bug
  • Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)

PRs

@GuySartorelli
Copy link
Member

PR merged. The fix will be included in the October minor release.

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

No branches or pull requests

2 participants