Skip to content

Commit

Permalink
Add extra check for lldb path in krun --debugger (#4560)
Browse files Browse the repository at this point in the history
When invoking `krun --debugger` on MacOS, we check a file that's
supposed to specify where the lldb we use is installed on the system.

Sometimes the contents of this file are `LLDB-NOTFOUND` and we're
supposed to fall back to whatever lldb is on the user's PATH. There's a
bug where we don't handle this case properly, and this change fixes
that.
  • Loading branch information
gtrepta authored Jul 29, 2024
1 parent 7adfb98 commit 590d034
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion k-distribution/src/main/scripts/bin/krun
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ filterSubst=

if [[ "$OSTYPE" == "darwin"* ]]; then
LLDB_FILE="$(dirname "$0")/../lib/kllvm/lldb/k_lldb_path"
if [ -f "$LLDB_FILE" ]; then
if [[ -f "$LLDB_FILE" && -f "$(cat "$LLDB_FILE")" ]]; then
DBG_EXE="$(cat "$LLDB_FILE")"
else
DBG_EXE="lldb"
Expand Down

0 comments on commit 590d034

Please sign in to comment.