mirror of
https://github.com/XRPLF/clio.git
synced 2026-06-03 16:56:45 +00:00
15 lines
292 B
Bash
Executable File
15 lines
292 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Capture and print stdout, since gofmt doesn't use proper exit codes
|
|
#
|
|
set -e -o pipefail
|
|
|
|
if ! command -v gofmt &>/dev/null; then
|
|
echo "gofmt not installed or available in the PATH" >&2
|
|
exit 1
|
|
fi
|
|
|
|
output="$(gofmt -l -w "$@")"
|
|
echo "$output"
|
|
[[ -z "$output" ]]
|