File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -845,9 +845,9 @@ def _get_commands(target: str, flags: str):
845
845
sys .exit (1 )
846
846
847
847
# Detect anything that looks like a build target in the flags, and issue a warning.
848
- # Note that positional arguments after -- are all interpreted as target patterns. (If it's at the end, then no worries.)
848
+ # Note that positional arguments after -- are all interpreted as target patterns.
849
849
# And that we have to look for targets. checking for a - prefix is not enough. Consider the case of `-c opt` leading to a false positive
850
- if ('--' in additional_flags [: - 1 ]
850
+ if ('--' in additional_flags
851
851
or any (re .match (r'-?(@|:|//)' , f ) for f in additional_flags )):
852
852
log_warning (""">>> The flags you passed seem to contain targets.
853
853
Try adding them as targets in your refresh_compile_commands rather than flags.
You can’t perform that action at this time.
0 commit comments