Skip to content

Commit 4cac1f6

Browse files
committed
Use let to combine attr query
1 parent 8e834df commit 4cac1f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

refresh.template.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ def _get_commands(target: str, flags: str):
874874
# For header file we try to find from hdrs and srcs to get the targets
875875
# Since attr function can't query with full path, get the file name to query
876876
head, tail = os.path.split(file_path)
877-
target_statment = f"attr(hdrs, '{tail}', {target_statment}) + attr(srcs, '{tail}', {target_statment})"
877+
target_statment = f"let v = {target_statment} in attr(hdrs, '{tail}', $v) + attr(srcs, '{tail}', $v)"
878878
aquery_args = [
879879
'bazel',
880880
'aquery',

0 commit comments

Comments
 (0)