Skip to content

Commit

Permalink
main: suppress non-interactive warnings from manually sourced startup…
Browse files Browse the repository at this point in the history
… files
  • Loading branch information
akinomyoga committed Jun 19, 2022
1 parent a602876 commit 79efd42
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ble.pp
Expand Up @@ -60,8 +60,10 @@
builtin echo "ble.sh: ble.sh cannot be loaded into a subshell." >&3
return 1 2>/dev/null || builtin exit 1
elif [[ $- != *i* ]]; then
{ ((${#BASH_SOURCE[@]})) && case ${BASH_SOURCE[${#BASH_SOURCE[@]}-1]} in (*bashrc|*bash_profile) ;; (*) false ;; esac } ||
builtin echo "ble.sh: This is not an interactive session." >&3
case " ${BASH_SOURCE[*]##*/} " in
(*' .bashrc '* | *' .bash_profile '* | *' .profile '* | *' bashrc '* | *' profile '*) false ;;
esac &&
builtin echo "ble.sh: This is not an interactive session." >&3 || ((1))
return 1 2>/dev/null || builtin exit 1
fi 3>&2 &>/dev/null # set -x 対策 #D0930

Expand Down

0 comments on commit 79efd42

Please sign in to comment.