Skip to content

Instantly share code, notes, and snippets.

@solrevdev
Created March 29, 2025 11:40
Show Gist options
  • Save solrevdev/014a540bedab038721bb2953f0be0bc5 to your computer and use it in GitHub Desktop.
Save solrevdev/014a540bedab038721bb2953f0be0bc5 to your computer and use it in GitHub Desktop.
finds current asdf ruby version
#!/usr/bin/env bash
current_ruby=$(asdf current ruby | awk '{print $2}')
if [ -z "$current_ruby" ]; then
echo "Error: Could not determine current Ruby version via asdf." >&2
exit 1
else
echo "Found $current_ruby"
exit 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment