Skip to content

Commit 11ef25e

Browse files
authored
avoid pipefail issue with create_password
1 parent be9ede9 commit 11ef25e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/ood_core/batch_connect/template.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,10 @@ def bash_helpers
209209
export -f wait_until_port_used
210210
211211
# Generate random alphanumeric password with $1 (default: #{password_size}) characters
212-
create_passwd () {
212+
create_passwd () (
213+
set +o pipefail # ensure pipefail disabled, `head` closing stdin causes SIGPIPE
213214
tr -cd 'a-zA-Z0-9' < /dev/urandom 2> /dev/null | head -c${1:-#{password_size}}
214-
}
215+
)
215216
export -f create_passwd
216217
}
217218
export -f source_helpers

0 commit comments

Comments
 (0)