You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bash ${VAR} source: track literal assignments to avoid a wrong-directory false positive #2172
Follow-up to #2079 / #2139. That fix resolves source "${VAR}/lib/x.sh" by stripping the leading expansion and resolving the literal suffix against the script's own directory (the BENCH_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" idiom). When the variable does NOT equal the script dir and a same-named decoy exists under the script dir, it binds to the wrong file.
Verified false positive: scripts/deploy.sh with ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" sourcing "${ROOT}/lib/utils.sh" (real target <root>/lib/utils.sh) emits imports_from -> <root>/scripts/lib/utils.sh (the decoy under the script dir). It is bounded by the is_file() gate and flagged INFERRED, but it is a wrong edge to a real node.
Fix direction: track top-level literal assignments plus the dirname "${BASH_SOURCE[0]}" idiom (with optional /.. suffixes) for the leading variable and use that base; keep the script-dir guess only when the variable is untracked.
Activity
fix: resolve ${VAR} bash sources against the variable's real base (#2172
fix: review follow-ups for the bash/SQL contributor PRs (#2171/#2172/#…
safishamsi commentedon Jul 26, 2026
Fixed in v0.9.27 (#2193, thanks @Souptik96). A source "${VAR}/lib.sh" with a tracked assignment (or the dirname BASH_SOURCE idiom) resolves against the variable's real dir instead of guessing the script's own. https://github.com/Graphify-Labs/graphify/releases/tag/v0.9.27
Squashed commit of the following:
fix: resolve ${VAR} bash sources against the variable's real base (Gr…
fix: review follow-ups for the bash/SQL contributor PRs (Graphify-Lab…