mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-02-01 11:34:59 +01:00
Don't complain about unset 'sourced'
If the user's bash profile contains 'set -u' (to protect against typos in variable names; think "rm -Rf $TMp/*"), starting a new kitty terminal resulted in a spurious `bash: sourced: unbound variable` message.
This commit is contained in:
@@ -318,7 +318,7 @@ _ksi_main() {
|
||||
builtin local venv="${VIRTUAL_ENV}/bin/activate"
|
||||
builtin local sourced=""
|
||||
_ksi_s_is_ok() {
|
||||
[[ -z "$sourced" && "$KITTY_CLONE_SOURCE_STRATEGIES" == *",$1,"* ]] && builtin return 0
|
||||
[[ -z "${sourced:-}" && "$KITTY_CLONE_SOURCE_STRATEGIES" == *",$1,"* ]] && builtin return 0
|
||||
builtin return 1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user