From b5e633a2f3c2aa3a82258125348f2363321bfb19 Mon Sep 17 00:00:00 2001 From: Keith Burzinski Date: Sun, 25 Feb 2024 12:37:35 -0600 Subject: [PATCH] Fix test_build_components for macOS sed (#6278) --- script/test_build_components | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/script/test_build_components b/script/test_build_components index f951ba7545..2396353198 100755 --- a/script/test_build_components +++ b/script/test_build_components @@ -28,7 +28,12 @@ start_esphome() { component_test_file="./tests/test_build_components/build/$target_component.$test_name.$target_platform.yaml" cp $target_platform_file $component_test_file - sed -i "s!\$component_test_file!../../.$f!g" $component_test_file + if [[ "$OSTYPE" == "darwin"* ]]; then + # macOS sed is...different + sed -i '' "s!\$component_test_file!../../.$f!g" $component_test_file + else + sed -i "s!\$component_test_file!../../.$f!g" $component_test_file + fi # Start esphome process echo "> [$target_component] [$test_name] [$target_platform]"