Skip to content

Conversation

LukasFritzeDev
Copy link
Contributor

@LukasFritzeDev LukasFritzeDev commented Aug 3, 2025

Unquoted variable caused commands in scripts to fail when the site path contained spaces. Quoting ensures the path is treated as a single argument.

closes #85

The Issue

Unquoted variable caused commands in scripts to fail when the site path
contained spaces. Quoting ensures the path is treated as a single argument.

closes ddev#85
Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I sure don't see any harm in this! I do find it odd that an extra variable was created, DDEV_SITE_PATH, but... And there are other ways these tasks could have been done, but there's no harm that I see here.

@rfay rfay changed the title fix: quote $DDEV_SITE_PATH to handle paths with spaces fix: quote $DDEV_SITE_PATH to handle paths with spaces, fixes #85 Aug 3, 2025
@tyler36 tyler36 self-requested a review August 4, 2025 00:40
Copy link
Collaborator

@tyler36 tyler36 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Test

  1. Create project with space in name.

    mkdir 'foo bar'
    cd 'foo bar'
    ddev config --project-type=wordpress --project-name=foobar
    ddev wp core download
  2. Install addon

    ddev addon get LukasFritzeDev-ddev-browsersync-58d55ef.tar.gz
  3. Start addon

    ddev browsersync
  4. Confirm 'Browsersync: connected' appears in browser when visiting "https://foobar.ddev.site:3000"

  5. Remove footer from "./wp-content/themes/twentytwentyfive/templates/home.html" and confirm site auto-reloads.

@rfay rfay merged commit dfce759 into ddev:main Aug 4, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

setup-wordpress-settings fails if directory name contains a space
3 participants