Skip to content

Commit 73ada01

Browse files
laszlocsomorlaurentlb
authored andcommitted
emit_size(): fix on macOS (#104)
emit_size(): fix on macOS - use "wc" instead of "stat"
1 parent 5d8c896 commit 73ada01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rules/shell_command/rules.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def _emit_size_impl(ctx):
3333
# param (see convert_to_uppercase below). This would be more robust
3434
# against escaping issues. Note that actions require the full `path`,
3535
# not the ambiguous truncated `short_path`.
36-
command = "stat -L -c%%s '%s' > '%s'" %
36+
command = "wc -c '%s' | awk '{print $1}' > '%s'" %
3737
(in_file.path, out_file.path),
3838
)
3939

0 commit comments

Comments
 (0)