Skip to content

Commit b767a2d

Browse files
JustinPihonymuuki88
authored andcommitted
Remove carriage return characters when loading configuration files. (#1078)
* Remove carriage return characters when loading configuration files. Fixes #1074 * Also fix ash-template
1 parent 4e50958 commit b767a2d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/resources/com/typesafe/sbt/packager/archetypes/scripts/ash-template

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fi
4040

4141
# Loads a configuration file full of default command line options for this script.
4242
loadConfigFile() {
43-
cat "$1" | sed '/^\#/d' | sed 's/^-J-X/-X/' | tr '\r\n' ' '
43+
cat "$1" | sed '/^\#/d;s/\r$//' | sed 's/^-J-X/-X/' | tr '\r\n' ' '
4444
}
4545

4646

src/main/resources/com/typesafe/sbt/packager/archetypes/scripts/bash-template

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ run() {
263263

264264
# Loads a configuration file full of default command line options for this script.
265265
loadConfigFile() {
266-
cat "$1" | sed '/^\#/d'
266+
cat "$1" | sed '/^\#/d;s/\r$//'
267267
}
268268

269269
# Now check to see if it's a good enough version

0 commit comments

Comments
 (0)