Commit Graph

14 Commits

Author SHA1 Message Date
ssongliu
86aa6c09c6 fix: resolve snapshot extraction directory missing issue (#13104) 2026-06-24 18:23:37 +08:00
ssongliu
d55982bde0 refactor: update agent and core utilities (#12621) 2026-05-21 12:35:09 +08:00
Sanjay Santhanam
b06bc0a455 fix(cmd): use exec.LookPath in Which() so detection works without external 'which' (#12651)
cmd.Which() previously shelled out to `which <name>` to determine whether
a binary was on PATH. On distributions that do not ship a `which` package
by default — Arch Linux is the canonical example, but the same applies to
several minimal container images — `which` itself is missing, so every
call to Which() returned false and 1Panel reported core dependencies
(notably Docker) as 'not installed' even when they were running normally.

Switch the primary path to Go's exec.LookPath, which uses the process
PATH directly and has no external dependency. The original shell-out is
preserved as a fallback so any environment where the agent's PATH
differs from the user's interactive shell PATH (the original reason the
shell-out existed) keeps working unchanged.

Both copies are updated (agent/utils/cmd/cmd.go and core/utils/cmd/cmd.go)
and a small unit test is added to each package to guard the regression.

Fixes #12605

Signed-off-by: Sanjay Santhanam <51058514+Sanjays2402@users.noreply.github.com>
2026-05-06 10:47:02 +08:00
ssongliu
c59105f050 feat: Encapsulate command execution methods (#8401) 2025-04-15 22:15:18 +08:00
zhengkunwang
7f7731a52e fix(runtime): fix issue with install extensions failed in php runtime (#8071) 2025-03-05 11:20:58 +00:00
ssongliu
5963e28b25 fix: Fix ollama model log exception (#8037) 2025-02-28 07:26:56 +00:00
ssongliu
79b8d17887 feat: Support gpu of schema v11 (#7987) 2025-02-25 14:16:22 +08:00
ssongliu
8283cd7d02 feat: adjust internationalization errors and the positions of global … (#7767) 2025-01-24 03:00:07 +00:00
ssongliu
ba1d65f35f feat: The result of the scheduled task execution is based on the task (#7586) 2024-12-28 13:09:26 +00:00
zhengkunwang223
75142b33a4 feat(common): Standardize Permissions for Creating Folders and Files 2024-12-20 16:13:23 +08:00
ssongliu
a627aa9915 feat: merge from dev (#7366)
* feat: merge from dev

* feat: Merge mobile style code from the dev branch
2024-12-17 15:59:21 +08:00
ssongliu
86bf7ea73a feat: 计划任务脚本支持选择用户及解释器 (#6721)
Refs #3933 #2738
2024-10-15 08:05:21 +00:00
zhengkunwang
ba9feb0941 feat: PHP 运行环境增加扩展管理 (#6352) 2024-09-03 13:45:41 +00:00
ssongliu
8d28b7db94 pref: backend 重命名 agent 2024-07-23 14:48:37 +08:00