chore: update bin/rubocop-daemon-wrapper

This commit is contained in:
2020-09-23 18:52:48 +01:00
parent bea7c9d509
commit bde5c6de36

View File

@@ -4,7 +4,7 @@ set -e
COMMAND_PREFIX=""
if [ -n "$RUBOCOP_DAEMON_USE_BUNDLER" ] || [ -n "$BUNDLER_VERSION" ]; then
if [ -n "$RUBOCOP_DAEMON_USE_BUNDLER" ]; then
COMMAND_PREFIX="bundle exec"
fi
@@ -91,10 +91,7 @@ mkdir -p "$LOCK_PATH"
for ARG in $@; do
if [ -z "$STDIN_CONTENT" ] && [ "$ARG" == "--stdin" ] || [ "$ARG" == "-s" ]; then
# Preserve final new lines when ingesting from STDIN
STDIN_CONTENT="$(
cat
printf x
)"
STDIN_CONTENT="$(cat; printf x)"
STDIN_CONTENT=${STDIN_CONTENT%x}
fi
done