-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generated shell script fails to run inside docker container because of empty line before shebang unix #119
Comments
Create very simple systemd service file in
Start the service: The service won't start and the following will appear in journal (
The problem is that the first line of the launch script is empty line. I think systemd is being correct (and perhaps strict) here. The shebang line should be the first line in the file. Perhaps the fix could be something like this? diff --git a/src/main/twirl/xerial/sbt/pack/launch.scala.txt b/src/main/twirl/xerial/sbt/pack/launch.scala.txt
index 632d466..1a13ffd 100644
--- a/src/main/twirl/xerial/sbt/pack/launch.scala.txt
+++ b/src/main/twirl/xerial/sbt/pack/launch.scala.txt
@@ -1,5 +1,4 @@
-@(opts:xerial.sbt.pack.LaunchScript.Opts, expandedClasspath:Option[String])
-#!/bin/sh
+@(opts:xerial.sbt.pack.LaunchScript.Opts, expandedClasspath:Option[String])#!/bin/sh
#/*--------------------------------------------------------------------------
# * Copyright 2012 Taro L. Saito
# * |
I just ran into this issue. For now I worked around it by using |
Try sbt-0.9.2 with a fix in #120 |
Was struggling with this problem for some time where the script ran fine but failed to execute with service, putting the shebang in the first line solved it |
Generated shell script under target/pack/bin looks like:
though it runs on my linux machine, it fails to run inside docker container.
The fix consists on removing the first empty line, but ideally it shouldn't appear on generation.
Desired output:
The text was updated successfully, but these errors were encountered: