Skip to content

Commit 7fec845

Browse files
committed
core: main: Provide sane defaults when the script is provided via STDIN
Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
1 parent d6378b6 commit 7fec845

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sbin/woeusb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2146,6 +2146,13 @@ if [ -v 'BASH_SOURCE[0]' ]; then
21462146
script_name \
21472147
script_dir \
21482148
program_basecommand
2149+
else
2150+
# sane defaults
2151+
script_name=_script_
2152+
program_basecommand=_script_
2153+
script_filename=_script_
2154+
script_dir=
2155+
script_path=
21492156
fi
21502157
declare -ar program_args=("${@}")
21512158

0 commit comments

Comments
 (0)