From 5be791a7edda89cc9a26866cd42c4b0ae6d0a00b Mon Sep 17 00:00:00 2001 From: Koichi Nakashima Date: Sat, 15 Feb 2020 14:11:19 +0900 Subject: [PATCH] Workaround for MSYS --- lib/general.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/general.sh b/lib/general.sh index f2c68fe0..da756bc3 100644 --- a/lib/general.sh +++ b/lib/general.sh @@ -47,6 +47,12 @@ shellspec_constants() { " # shellcheck disable=SC2059 eval "$(printf "$SHELLSPEC_EVAL")" + + # Workaround: Variable CR is empty on MSYS + if eval "[ \${#${1}CR} -eq 0 ] &&:"; then + set -- "$1" "$(printf '\015')" + eval "${1}CR=\$2" + fi } shellspec_constants SHELLSPEC_