Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Use BSD-compatible in-place editing for sed.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Feb 11, 2020
1 parent 3a3118f commit e9daed8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/6887.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix the use of sed in the linting scripts when using BSD sed.
3 changes: 2 additions & 1 deletion scripts-dev/config-lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# Exits with 0 if there are no problems, or another code otherwise.

# 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
git diff --exit-code docs/sample_config.yaml

0 comments on commit e9daed8

Please sign in to comment.