tako-cli 0.2.44 → 0.2.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +205 -205
- package/install.sh +7 -1
- package/package.json +1 -1
package/install.sh
CHANGED
|
@@ -445,4 +445,10 @@ main() {
|
|
|
445
445
|
verify_and_launch
|
|
446
446
|
}
|
|
447
447
|
|
|
448
|
-
main
|
|
448
|
+
# 仅在直接执行时跑 main;被 `source` 加载(如测试场景)时只导出函数,不自动运行。
|
|
449
|
+
# - bash install.sh: BASH_SOURCE[0]=install.sh, $0=install.sh → 跑
|
|
450
|
+
# - curl ... | bash: BASH_SOURCE[0]="", $0=bash → 跑(BS 为空)
|
|
451
|
+
# - source install.sh: BASH_SOURCE[0]=install.sh, $0=bash → 跳过
|
|
452
|
+
if [ -z "${BASH_SOURCE[0]:-}" ] || [ "${BASH_SOURCE[0]}" = "$0" ]; then
|
|
453
|
+
main "$@"
|
|
454
|
+
fi
|