Skip to content

Commit 243ab91

Browse files
committed
fix(makefile): correct GNU sed detection method
change sed detection from checking OS to checking for GNU version to ensure compatibility across different environments
1 parent 4ce8307 commit 243ab91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ generate: generate-testdata generate-docs update-k8s-version ## Update/generate
7575
remove-spaces:
7676
@echo "Removing trailing spaces"
7777
@bash -c ' \
78-
if [[ "$$(uname)" == "Linux" ]]; then \
78+
if sed --version 2>&1 | grep -q "GNU"; then \
7979
find . -type f -name "*.md" -exec sed -i "s/[[:space:]]*$$//" {} + || true; \
8080
else \
8181
find . -type f -name "*.md" -exec sed -i "" "s/[[:space:]]*$$//" {} + || true; \

0 commit comments

Comments
 (0)