From e9daed872409f9739ff105d9a0a8a78e35bed9bf Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 11 Feb 2020 07:32:55 -0500 Subject: [PATCH] Use BSD-compatible in-place editing for sed. --- changelog.d/6887.misc | 1 + scripts-dev/config-lint.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelog.d/6887.misc diff --git a/changelog.d/6887.misc b/changelog.d/6887.misc new file mode 100644 index 000000000000..b351d47c7bdf --- /dev/null +++ b/changelog.d/6887.misc @@ -0,0 +1 @@ +Fix the use of sed in the linting scripts when using BSD sed. diff --git a/scripts-dev/config-lint.sh b/scripts-dev/config-lint.sh index 677a854c8579..189ca66535e6 100755 --- a/scripts-dev/config-lint.sh +++ b/scripts-dev/config-lint.sh @@ -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