Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions container/go/cmd/create_image_config/create_image_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ func main() {

var allArgs []string
for _, arg := range os.Args[1:] {
if strings.HasPrefix(arg, "@") {
content, err := os.ReadFile(arg[1:])
if strings.HasPrefix(arg, "@@") {
content, err := os.ReadFile(arg[2:])
if err != nil {
log.Fatalf("Failed to read argfile %s: %v", arg, err)
}
Expand Down
2 changes: 1 addition & 1 deletion container/image.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def _add_create_image_config_args(
if ctx.attr.launcher:
args.add("-entrypointPrefix", ctx.file.launcher.basename, format = "/%s")
args.add_all(ctx.attr.launcher_args, before_each = "-entrypointPrefix")
args.use_param_file(param_file_arg = "@%s", use_always=False)
args.use_param_file(param_file_arg = "@@%s", use_always=False)
args.set_param_file_format("multiline")

def _format_legacy_label(t):
Expand Down
5 changes: 3 additions & 2 deletions java/image.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def _jar_app_layer_impl(ctx):
"/usr/bin/java",
"-cp",
# Support optionally passing the classpath as a file.
"@" + classpath_path if ctx.attr._classpath_as_file else classpath,
"@" + classpath_path if ctx.attr.classpath_as_file else classpath,
] + jvm_flags + ([ctx.attr.main_class] + args if ctx.attr.main_class != "" else [])

file_map = {
Expand Down Expand Up @@ -245,7 +245,8 @@ jar_app_layer = rule(
"deps": attr.label_list(),

# Whether the classpath should be passed as a file.
"_classpath_as_file": attr.bool(default = False),
# Disable for the uncommon case where it causes issues.
"classpath_as_file": attr.bool(default = True),
"_jdk": attr.label(
default = Label("@bazel_tools//tools/jdk:current_java_runtime"),
providers = [java_common.JavaRuntimeInfo],
Expand Down