oh-my-bash: Show warning and fail for non-interactive shells

Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
This commit is contained in:
Jacob Hrbek
2019-07-24 03:00:45 +02:00
committed by Koichi Murase
parent e84ace339b
commit 31f095f3ac

View File

@@ -1,10 +1,10 @@
#!/usr/bin/env bash
# Bail out early if non-interactive
case $- in
*i*) ;;
*) return;;
esac
if [[ $- != *i* ]]; then
printf 'oh-my-bash: Shell is not interactive.\n' >&2
return 1
fi
# Check for updates on initial load...
if [ "$DISABLE_AUTO_UPDATE" != "true" ]; then