From 666f5c5b7f29beb474b1c12726f8dd39cd1babe9 Mon Sep 17 00:00:00 2001 From: Saikari Date: Tue, 27 Jan 2026 06:04:17 +0300 Subject: refactor _find_shell_from_parent function to simplify error handling for shell path retrieval --- xmake/core/base/tty.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmake/core/base/tty.lua b/xmake/core/base/tty.lua index 788327d20..5c7f360c2 100644 --- a/xmake/core/base/tty.lua +++ b/xmake/core/base/tty.lua @@ -274,8 +274,8 @@ function tty._find_shell_from_parent() local shell_name = nil local shell_path = nil if os.isfile("/proc/" .. ppid .. "/exe") then - local ok, link = pcall(os.readlink, "/proc/" .. ppid .. "/exe") - if ok and link then + local link = os.readlink("/proc/" .. ppid .. "/exe") + if link then shell_path = link end end -- cgit v1.3.1