Revise use of sed in-place option in tox.ini to support testing on MacOS#2047
Merged
Ruwann merged 1 commit intospec-first:mainfrom May 28, 2025
Merged
Revise use of sed in-place option in tox.ini to support testing on MacOS#2047Ruwann merged 1 commit intospec-first:mainfrom
Ruwann merged 1 commit intospec-first:mainfrom
Conversation
Contributor
Author
|
I didn't open an issue. I would be glad to create one if you prefer. Please comment. |
0b093f3 to
a6f0dfa
Compare
Contributor
Author
|
This solution gains test portability across Linux and MacOS. Please consider. |
d60f580 to
5ed35dc
Compare
sed on Linux accepts an optional value with the `-i` flag, a file extension to use sed on MacOS requires a value with the `-i` flag, a file extension to use credit to https://stackoverflow.com/questions/5694228/sed-in-place-flag-that-works-both-on-mac-bsd-and-linux
Ruwann
approved these changes
May 28, 2025
Member
Ruwann
left a comment
There was a problem hiding this comment.
Thanks, pipeline is green and also works on my WSL setup
| min: cp pyproject.toml .pyproject.toml | ||
| min: sed -i -E 's/"(\^|~|>=)([ 0-9])/"==\2/' pyproject.toml | ||
| # sed in-place flag works on Linux and Mac, writes a .bak file | ||
| min: sed -i.bak -E 's/"(\^|~|>=)([ 0-9])/"==\2/' pyproject.toml |
Contributor
Author
|
Thanks @Ruwann |
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.
sed on Linux accepts an optional value with the
-iflag, a file extension to usesed on MacOS requires a value with the
-iflag, a file extension to usecredit to https://stackoverflow.com/questions/5694228/sed-in-place-flag-that-works-both-on-mac-bsd-and-linux
This change fixes the following error seen when running tox on macOS: