diff --git a/cargo/private/cargo_build_script.bzl b/cargo/private/cargo_build_script.bzl index eb91b0ac90..2c2a64a508 100644 --- a/cargo/private/cargo_build_script.bzl +++ b/cargo/private/cargo_build_script.bzl @@ -182,7 +182,7 @@ def _pwd_flags(args): fix_next_arg = False else: opt, path = split_flag(arg) - if opt and path: + if opt and path and not paths.is_absolute(path): res.append("{}${{pwd}}/{}".format(opt, path)) else: fix_next_arg = (opt != None)