mirror of
https://github.com/hassio-addons/bashio.git
synced 2025-05-07 04:21:29 +00:00
Fix arguments for sourced script
Shifts around the arguments and updates $0 so that they would be as you expect if the script was exec'd instead of source'd
This commit is contained in:
parent
2de0c2304a
commit
bcc17b9d1a
1 changed files with 3 additions and 1 deletions
|
@ -22,5 +22,7 @@ __BASHIO_LIB_DIR=$(dirname "${__BASHIO_BIN}")
|
|||
source "${__BASHIO_LIB_DIR}/bashio.sh"
|
||||
|
||||
# Execute source
|
||||
BASH_ARGV0=${1:?script to source must be provided}
|
||||
shift
|
||||
# shellcheck source=/dev/null
|
||||
source "$@"
|
||||
source "$0" "$@"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue