Use BSD-compatible in-place editing for sed. (#6887)

This commit is contained in:
Patrick Cloke 2020-02-12 07:02:19 -05:00 committed by GitHub
parent 88d41e94f5
commit ba547ec3a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

1
changelog.d/6887.misc Normal file
View File

@ -0,0 +1 @@
Fix the use of sed in the linting scripts when using BSD sed.

View File

@ -3,7 +3,8 @@
# Exits with 0 if there are no problems, or another code otherwise. # Exits with 0 if there are no problems, or another code otherwise.
# Fix non-lowercase true/false values # Fix non-lowercase true/false values
sed -i -E "s/: +True/: true/g; s/: +False/: false/g;" docs/sample_config.yaml sed -i.bak -E "s/: +True/: true/g; s/: +False/: false/g;" docs/sample_config.yaml
rm docs/sample_config.yaml.bak
# Check if anything changed # Check if anything changed
git diff --exit-code docs/sample_config.yaml git diff --exit-code docs/sample_config.yaml