Skip to content

Commit

Permalink
Fix silly macOS test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
jstrieb committed Dec 22, 2023
1 parent 4c86e2b commit fbb43bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions just_sh/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def expression_to_string(expression: ExpressionType, depth: int = 0) -> str:
}
""",
"sha256_file": r"""sha256_file() {
if type sha256sum > /dev/null; then
if type sha256sum > /dev/null 2>&1; then
sha256sum --binary "${1}" | cut -d ' ' -f 1
elif type python3 > /dev/null 2>&1; then
python3 -c 'from hashlib import sha256; import sys; print(sha256(sys.stdin.buffer.read()).hexdigest())' \
Expand All @@ -283,7 +283,7 @@ def expression_to_string(expression: ExpressionType, depth: int = 0) -> str:
}
""",
"sha256": r"""sha256() {
if type sha256sum > /dev/null; then
if type sha256sum > /dev/null 2>&1; then
printf "%s" "${1}" | sha256sum --binary | cut -d ' ' -f 1
elif type python3 > /dev/null 2>&1; then
printf "%s" "${1}" | \
Expand Down

0 comments on commit fbb43bf

Please sign in to comment.