chainguard-dev / rules_apko

Bazel rules for apko
https://apko.dev
Apache License 2.0
23 stars 15 forks source link

Bad #! path in apko_run shell wrapper #65

Open anguslees opened 5 months ago

anguslees commented 5 months ago

https://github.com/chainguard-dev/rules_apko/blob/1d78765293a0baf3f92ca49efa51d6c02b9c828e/apko/private/apko_run.bzl#L24-L25

Note double #!#!. This causes the script to fail with "external/rules_apko/apko/_apko_run.sh: 11: Bad substitution"

In addition, the """\<newline>#!...""" creates a bad newline before the #!.

I think this should be:

LAUNCHER_TEMPLATE = """\
#!/usr/bin/env sh
...
"""