File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,8 +58,20 @@ if ! nix build .#ci-target-vm --out-link "$VM_STATE-link" --show-trace 2>&1; the
5858 lc_fail " deploy-vm/build-vm" " nix build of ci-target-vm failed"
5959fi
6060
61- VM_RUNNER=" $( find " $VM_STATE -link/bin" -maxdepth 1 -type f -name ' run-*-vm' | head -n1) "
62- [[ -x " $VM_RUNNER " ]] || lc_fail " deploy-vm/build-vm" " no runnable VM script under $VM_STATE -link/bin"
61+ # qemu-vm.nix produces `bin/run-<hostname>-vm` as a SYMLINK (not a regular
62+ # file), so `find -type f` would miss it. `-L` makes find follow symlinks
63+ # and treat the target as the entry's type, after which `-type f` matches
64+ # the underlying script. Diagnostic listing is emitted so failures are
65+ # self-explanatory in the workflow log.
66+ if ! VM_RUNNER=" $( find -L " $VM_STATE -link/bin" -maxdepth 1 -type f -name ' run-*-vm' 2> /dev/null | head -n1) " || [[ -z " $VM_RUNNER " ]]; then
67+ lc_info " deploy-vm/build-vm: contents of $VM_STATE -link"
68+ ls -la " $VM_STATE -link/" 2>&1 | sed ' s/^/ /' || true
69+ lc_info " deploy-vm/build-vm: contents of $VM_STATE -link/bin"
70+ ls -la " $VM_STATE -link/bin/" 2>&1 | sed ' s/^/ /' || true
71+ lc_fail " deploy-vm/build-vm" " no run-*-vm script under $VM_STATE -link/bin"
72+ fi
73+
74+ [[ -x " $VM_RUNNER " ]] || lc_fail " deploy-vm/build-vm" " VM runner '$VM_RUNNER ' is not executable"
6375lc_info " deploy-vm/build-vm: runner = $VM_RUNNER "
6476lc_ok " deploy-vm/build-vm"
6577
You can’t perform that action at this time.
0 commit comments