Skip to content

Fix PATH override in syncdb command#43

Open
artisba wants to merge 1 commit into
mainfrom
bugfix/syndb-path
Open

Fix PATH override in syncdb command#43
artisba wants to merge 1 commit into
mainfrom
bugfix/syndb-path

Conversation

@artisba
Copy link
Copy Markdown
Collaborator

@artisba artisba commented Mar 3, 2026

Overwriting the PATH completely makes the syncdb command fail with ~/.ddev/wunderio/core/tooling/syncdb.sh: line 60: ddev: command not found (Apple silicon Mac, DDEV installed via Homebrew). Let's prepend the wunderio dir to the existing PATH instead.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts the host-side syncdb DDEV command so it no longer overwrites the user’s existing PATH, fixing cases where ddev is no longer discoverable (e.g., Homebrew installs on Apple Silicon).

Changes:

  • Prepend ~/.ddev/wunderio/core/ to the existing PATH instead of replacing it entirely.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

## ProjectTypes: drupal9,drupal10,drupal11

export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:$HOME/.ddev/wunderio/core/
export PATH="$HOME/.ddev/wunderio/core/:$PATH"
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

If $PATH is unset/empty in the environment, this expands to a trailing : (empty PATH entry), which implicitly adds the current working directory to PATH on many shells. Consider guarding for an empty/unset PATH (e.g., only append :$PATH when non-empty, or use ${PATH:+:$PATH}) to avoid accidentally including . in the executable search path.

Suggested change
export PATH="$HOME/.ddev/wunderio/core/:$PATH"
export PATH="$HOME/.ddev/wunderio/core/${PATH:+:$PATH}"

Copilot uses AI. Check for mistakes.
zHelmet added a commit that referenced this pull request Mar 9, 2026
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.

2 participants