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.
Files changed (3) hide show
  1. package/dist/index.js +205 -205
  2. package/install.sh +7 -1
  3. 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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tako-cli",
3
- "version": "0.2.44",
3
+ "version": "0.2.47",
4
4
  "description": "Tako CLI - AI coding tools launcher",
5
5
  "type": "module",
6
6
  "bin": {