Use QVM_BIN_DIR fallback for script paths and set in flake

This commit is contained in:
Joshua Bell 2026-01-26 10:27:57 -06:00
parent 8d68e1daf9
commit 7864673dcb
6 changed files with 13 additions and 14 deletions

View file

@ -130,8 +130,8 @@ main() {
log_info "First run detected - building VM..."
log_info "This may take several minutes."
SCRIPT_DIR="$(dirname "$0")"
if ! "$SCRIPT_DIR/qvm-rebuild"; then
local qvm_rebuild="${QVM_BIN_DIR:-$(dirname "$0")}/qvm-rebuild"
if ! "$qvm_rebuild"; then
die "Failed to build VM. Run 'qvm rebuild' manually to debug."
fi
fi