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 Jul 28, 2022
1 parent 2587bb0 commit 5f63856
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ble.pp
Expand Up @@ -67,8 +67,10 @@
esac

if [[ $- != *i* ]]; then
{ ((${#BASH_SOURCE[@]})) && case ${BASH_SOURCE[${#BASH_SOURCE[@]}-1]} in (*bashrc|*bash_profile) ;; (*) false ;; esac } ||
echo "ble.sh: This is not an interactive session." >&2
case " ${BASH_SOURCE[*]##*/} " in
(*' .bashrc '* | *' .bash_profile '* | *' .profile '* | *' bashrc '* | *' profile '*) false ;;
esac &&
builtin echo "ble.sh: This is not an interactive session." >&2 || ((1))
return 1 2>/dev/null || exit 1
fi

Expand Down

0 comments on commit 5f63856

Please sign in to comment.