Closed ghik closed 3 years ago
Hi @ghik,
Thank you for your contribution! We really value the time you've taken to put this together.
Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:
Thanks for your patience :hugs:
I wonder if this has any other impacts :thinking:
zip
distributions on linux for linux should work the same :+1: zip
distributions on windows for linux :thinking: , will the path be properly set? If the scriptClasspath
uses the unix separators, this should also be broken right now, right?docker
distributions on linux should work the same :+1: docker
distributions` on windows should now work :+1: Sorry for the late response, I was on vacation.
My changes only affect Bash & Ash start script generation.
As far as I understand, these start scripts are used only on Linux and are shared by zip
and docker
distributions. Therefore, this PR should fix the issue for both zip
and docker
while not breaking anything.
When generating Unix startup scripts,
scriptClasspath
always uses Unix file separators (/
). Therefore,File.separator
cannot be used because the build environment may be on another system (Windows). We must always use Unix file separator when working with Unix paths.This problem was discovered by me when I tried to build a Linux docker image on Windows. Bash startup script had wrong classpath generated.