mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Rust: strengthen linting script
* `bazel run //rust/ast-generator:inject-sources` could fail on macOS if a non-coreutils `cp` was used * that is now also run by `lint.py` to ensure the sources cargo needs are present
This commit is contained in:
@@ -66,7 +66,9 @@ write_file(
|
||||
'DST_DIR="$(dirname "$(rlocation "$1")")"',
|
||||
'mkdir -p "$DST_DIR/src/codegen/grammar"',
|
||||
] + [
|
||||
'cp -f --no-preserve=mode "$(rlocation "$%s")" "$DST_DIR/%s"' % item
|
||||
# using cat instead of cp to honor default umask
|
||||
# (also, macOS does not support `cp --no-preserve=mode`)
|
||||
'cat "$(rlocation "$%s")" > "$DST_DIR/%s"' % item
|
||||
for item in enumerate(_codegen_outs, 2)
|
||||
],
|
||||
is_executable = True,
|
||||
|
||||
Reference in New Issue
Block a user