Repository navigation
fix: run share provider scripts via bash, fixes Windows ddev share - #8157
Merged
Merged
Conversation
On Windows, Go's os.Stat() does not report Unix execute bits for files on NTFS, so the executable check always failed for .sh provider scripts. Running the scripts via bash (using util.FindBashPath()) fixes Windows and is more explicit on all platforms, removing the need for the executable bit check entirely. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
Download the artifacts for this pull request:
See Testing a PR. |
stasadev
approved these changes
Feb 19, 2026
stasadev
left a comment
Member
There was a problem hiding this comment.
Looks good to me, I tested it in a Windows VM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Issue
Related: #8156
I was testing that and found that
ddev sharedid not work at all on WIndows.On Windows,
ddev sharefails with:Even though the
.shfiles have execute bits set (visible vials -l), Go'sos.Stat()on Windows/NTFS does not report Unix-style execute bits, so the check always fails. And even if the check passed,.shfiles cannot be executed directly on Windows — they require bash.How This PR Solves The Issue
GetShareProviderScriptentirely — it is unnecessary when scripts are always run via bashddev shareto always invoke the provider script viabash(using the existingutil.FindBashPath(), which finds Git Bash on Windows and returns"bash"on Linux/macOS), mirroring the same pattern used for custom host commandsManual Testing Instructions
On Windows (Git Bash):
make(or on another platform,make windows_amd64ormake windows_arm64or use from the PR's artifactsddev sharein a running project — should no longer fail with the "not executable" errorOn Linux/macOS:
ddev share— should work as beforeAutomated Testing Overview
ddev shareon Windows, it's skipped explicitly.Release/Deployment Notes
ddev shareprovider scripts and show output in real-time #8156 because it has improved kill behaviorNo breaking changes. The provider scripts are unchanged. Users with custom share providers in
.ddev/share-providers/are unaffected — they will now be run via bash rather than directly, which is what they already require.