Skip to content

Commit 89e97d6

Browse files
jankeromnesroboquat
authored andcommitted
[protoc] Automatically remove trailing spaces in generated pb.d.ts files
1 parent 99eb430 commit 89e97d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/protoc-generator.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ typescript_protoc() {
6969
-I /usr/lib/protoc/include -I"$ROOT_DIR" -I.. -I"../$PROTO_DIR" \
7070
"../$PROTO_DIR"/*.proto
7171

72-
# shellcheck disable=SC2011
73-
# ls -1 "$MODULE_DIR"/typescript/src/*_pb.d.ts | xargs sed -i -e "s/[[:space:]]*$//" || exit
72+
# remove trailing spaces
73+
find "$MODULE_DIR"/typescript/src -maxdepth 1 -name "*_pb.d.ts" -exec sed -i -e "s/[[:space:]]*$//" {} \;
7474

7575
popd > /dev/null || exit
7676
}

0 commit comments

Comments
 (0)