project-chip / connectedhomeip

Matter (formerly Project CHIP) creates more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.
https://buildwithmatter.com
Apache License 2.0
7.33k stars 1.97k forks source link

"sed -i" doesn't work on mac, it should be "sed -i ''" instead #32449

Open gaoyangsandy opened 6 months ago

gaoyangsandy commented 6 months ago

This line doesn't work on mac. https://github.com/project-chip/connectedhomeip/blob/6b026afebe68270df60058e95afa152ca30781fd/examples/chef/chef.py#L700

it should be -i '' instead per https://thoughtbot.com/blog/sed-102-replace-in-place

gaoyangsandy commented 6 months ago

Here's the failed message when I run it directly.

sed -i 's/CONFIG_DISABLE_IPV4=y/#\ CONFIG_DISABLE_IPV4\ is\ not\ set/g' sdkconfig sed: 1: "sdkconfig": unterminated substitute pattern