-
-
Notifications
You must be signed in to change notification settings - Fork 94
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Bashly Version
Latest Docker Image
Description
Creating heredoc with multiple consecutive newlines (e.g. simulating multiple Enter/default choices) results in those newlines being trimmed to only one newline. This results in possibly hard to debug bugs.
Contents of bashly.yml
Reproduction Steps
bashly init --minimal
cat <<EOT >src/root_command.sh
fdisk "/dev/sdc" <<EOF
n
p
3
w
EOF
EOT
bashly generateCompare contents of generated download script with src/root_command.sh
Actual Behavior
Only one newline instead of 2.
grep 'fdisk "/dev/sdc" <<EOF' download -B2 -A7Output:
root_command() {
# src/root_command.sh
fdisk "/dev/sdc" <<EOF
n
p
3
w
EOF
Which results in hard to debug failure
Expected Behavior
The same amount of newlines as in script
grep 'fdisk "/dev/sdc" <<EOF' download -B2 -A7Output:
root_command() {
# src/root_command.sh
fdisk "/dev/sdc" <<EOF
n
p
3
w
EOFMetadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working