Skip to content

Instantly share code, notes, and snippets.

@wtnabe
Last active June 1, 2025 04:36
Show Gist options
  • Save wtnabe/776d97020aab1bf696c36c6c61b0a8d0 to your computer and use it in GitHub Desktop.
Save wtnabe/776d97020aab1bf696c36c6c61b0a8d0 to your computer and use it in GitHub Desktop.
plantumlコマンドを-pipeで使う際の謎のエラーを可視化するwrapper script
#! /bin/bash
set -o pipefail
OUTPUT=$(plantuml "$@" 2>&1)
printf "%s" "$OUTPUT"
if printf "%s" "$OUTPUT" | grep -q 'java\.lang\.'; then
cat <<EOD >&2
Did you write multiple diagrams in single file ?
PlantUML with -pipe option cannot accept multiple images ...
Or something wrong about some diagrams with txt type ...
EOD
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment