diff --git a/internal/common/expand_variables.bzl b/internal/common/expand_variables.bzl index b3e64d7e6e..3e122fd97d 100644 --- a/internal/common/expand_variables.bzl +++ b/internal/common/expand_variables.bzl @@ -57,8 +57,8 @@ def expand_variables(ctx, s, outs = [], output_dir = False): fail("""$@ substitution may only be used with a single out Upgrading rules_nodejs? Maybe you need to switch from $@ to $(RULEDIR) See https://github.com/bazelbuild/rules_nodejs/releases/tag/0.42.0""") - additional_substitutions["@"] = ctx.outputs.outs[0].path if len(ctx.outputs.outs) == 1: + additional_substitutions["@"] = ctx.outputs.outs[0].path output_dir = ctx.outputs.outs[0].dirname.split("/") else: output_dir = rule_dir[:]