Fix: tolerate #! prefixed shebangs

This commit is contained in:
Reid 'arrdem' McKenzie 2023-07-05 12:26:16 -06:00
parent 72f82e0ace
commit 1bf3826f54

View file

@ -343,7 +343,11 @@ def main():
)
with open(opts.output, "w") as zapp:
shebang = "#!" + manifest["shebang"] + "\n"
shebang = manifest["shebang"]
if not shebang.endswith("\n"):
shebang = shebang + "\n"
if not shebang.startswith("#!"):
shebang = "#!" + shebang
zapp.write(shebang)
# Now we're gonna build the zapp from the manifest