fix #513 #514: skip head -1 on .exe hook binary, fix to_canvas() hardcoded obsidian path

This commit is contained in:
Safi
2026-04-22 23:01:53 +01:00
parent 85e713644e
commit 4bc20527c3
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -831,7 +831,7 @@ def to_canvas(
canvas_nodes.append({
"id": f"n_{node_id}",
"type": "file",
"file": f"graphify/obsidian/{fname}.md",
"file": f"{fname}.md",
"x": nx_x,
"y": nx_y,
"width": 180,
+4 -1
View File
@@ -13,7 +13,10 @@ _PYTHON_DETECT = """\
# Detect the correct Python interpreter (handles pipx, venv, system installs)
GRAPHIFY_BIN=$(command -v graphify 2>/dev/null)
if [ -n "$GRAPHIFY_BIN" ]; then
_SHEBANG=$(head -1 "$GRAPHIFY_BIN" | sed 's/^#![[:space:]]*//')
case "$GRAPHIFY_BIN" in
*.exe) _SHEBANG="" ;;
*) _SHEBANG=$(head -1 "$GRAPHIFY_BIN" | sed 's/^#![[:space:]]*//') ;;
esac
case "$_SHEBANG" in
*/env\\ *) GRAPHIFY_PYTHON="${_SHEBANG#*/env }" ;;
*) GRAPHIFY_PYTHON="$_SHEBANG" ;;