mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-05-11 05:55:37 +00:00
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:
committed by
Koichi Murase
parent
e84ace339b
commit
31f095f3ac
@@ -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
|
||||
|
Reference in New Issue
Block a user