op.sh: check for valid invocation (#33166)

no source
old-commit-hash: d0671bda6d
pull/33302/head
Maxime Desroches 9 months ago committed by GitHub
parent 54f912a1d5
commit 619c6ce4c2
  1. 6
      tools/op.sh

@ -1,5 +1,11 @@
#!/usr/bin/env bash
if [[ ! "${BASH_SOURCE[0]}" = "${0}" ]]; then
echo "Invalid invocation! This script must not be sourced."
echo "Run 'op.sh' directly or check your .bashrc for a valid alias"
return 0
fi
set -e
RED='\033[0;31m'

Loading…
Cancel
Save