fix: linux

This commit is contained in:
Chris Brown 2024-06-29 04:34:45 -04:00
parent 63c2bc4c56
commit 601b76741c
1 changed files with 5 additions and 5 deletions

View File

@ -143,7 +143,7 @@ if %ERRORLEVEL% neq 0 (
file1 = _runfiles_path(ctx.file.file1),
file2 = _runfiles_path(ctx.file.file2),
ignore_line_endings = _ignore_line_endings(ctx),
bash_bin = bash_bin
bash_bin = bash_bin,
),
is_executable = True,
)
@ -172,9 +172,9 @@ else
fi
if ! diff {strip_trailing_cr}"$RF1" "$RF2"; then
MSG={fail_msg}
if [[ "${{MSG}}"=="" (
if [[ "${{MSG}}" == "" ]]; then
MSG="why? diff {strip_trailing_cr}"${{RF1}}" "${{RF2}}" | cat -v"
)
fi
echo >&2 "FAIL: files \"{file1}\" and \"{file2}\" differ. ${{MSG}}"
exit 1
fi
@ -182,7 +182,7 @@ fi
fail_msg = shell.quote(ctx.attr.failure_message),
file1 = _runfiles_path(ctx.file.file1),
file2 = _runfiles_path(ctx.file.file2),
strip_trailing_cr = "--strip-trailing-cr " if ctx.attr.ignore_line_endings else ""
strip_trailing_cr = "--strip-trailing-cr " if ctx.attr.ignore_line_endings else "",
),
is_executable = True,
)