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

sed on mac needs -e #25

Merged
merged 5 commits into from
Oct 25, 2023
Merged

sed on mac needs -e #25

merged 5 commits into from
Oct 25, 2023

Conversation

medienagent-user
Copy link
Contributor

The Issue

See Issue #24

sed on macos needs "-e" before the script

How This PR Solves The Issue

changes

sed -i "s/REPLACE_ME/${DDEV_SITENAME}/g" redis/snapshots

to

sed -i -e "s/REPLACE_ME/${DDEV_SITENAME}/g" redis/snapshots

Manual Testing Instructions

on mac

cd into ddev project
ddev get ddev-redis-7

@medienagent-user
Copy link
Contributor Author

this should work on any system

@rfay
Copy link
Member

rfay commented Oct 18, 2023

This is a classic problem of trying to do something on the host. On ddev-platformsh I broke down and made a docker image just for this kind of problem, see https://github.com/ddev/ddev-platformsh/blob/28b127817ed9bdfa2175c30f915b6a236e6c5a4c/install.yaml#L134

The Dockerfile is at https://github.com/ddev/ddev-utilities and the image at https://hub.docker.com/r/ddev/ddev-utilities

I imagine it has a reliable sed in it that can be used predictably. Just a possibility

@seebeen seebeen linked an issue Oct 25, 2023 that may be closed by this pull request
@seebeen seebeen self-requested a review October 25, 2023 13:38
@seebeen seebeen changed the title #24 sed on mac needs -e sed on mac needs -e Oct 25, 2023
Copy link

@axmue axmue left a comment

Choose a reason for hiding this comment

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

Uh, this was a mistake.
Did'nt want this in the pullrequest. Sorry!
The second commit was not really intented.

@rfay
Copy link
Member

rfay commented Oct 25, 2023

You can revert your bad commit and push... that's all you have to do.

Axel Müller and others added 3 commits October 25, 2023 15:53
This reverts commit e66b6a8.
sed is bugging out on macOS. We use docker image and standardized sed
@seebeen
Copy link
Collaborator

seebeen commented Oct 25, 2023

I've implemented the sed fix with the ddev-util docker image. Thanks for reporting this and for the initial implementation 💪

@seebeen seebeen added this pull request to the merge queue Oct 25, 2023
Merged via the queue into ddev:master with commit e767b43 Oct 25, 2023
1 check passed
@github-actions
Copy link

🎉 This PR is included in version 2.6.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

sed fails on macos because of missing option -e bevor the script
4 participants