mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 06:23:17 -10:00
Messages that said the same thing for different settings are one message each, given what differs: - new_vm_flags_ignored and new_vm_flags_ignored_run (flags, vm, command) replace from_ignored, net_flag_ignored, git_protect_flag_ignored, size_flags_ignored, ports_flag_ignored, parts_flags_ignored, ssh_agent_flag_ignored and no_devcontainer_flag_ignored: one warning for each command that changes the same on the VM, naming only the flags given (ignoredFlags). - setting_already (command, vm) replaces net_already, agent_already, clone_on_already and clone_off_already. - setting_set (vm), for a stopped VM, replaces net_set_stopped, agent_set_stopped and links_next_start. - next_start (count, vm), for a running VM, replaces net_set_running, agent_set_running, size_next_start, agent_next_start, mounts_next_start, folder_next_start and net_off_next_start; a launch warns of each change with its next_start_* line, then next_start once. - program_missing, program_broken and program_old (+ _fix) replace lima_missing, lima_broken, lima_old, qemu_missing, macos_old and their _fix messages; the minimum versions are minLima and minMacOS in the lima backend, passed into program_old. - ports_list_needed replaces link_ports_invalid: devvm link publish and unpublish check their ports with ParsePortList, as devvm ports add does, and ParsePublish is gone. - no_vm replaces no_vm_link. - vm_unfinished says nothing of the user's is in the VM, as remake_unfinished does. Kept apart: git_protect_next_stop (it applies at the next stop, and devvm stop applies it), already_stopped and ports_all_already (not settings), group_already (joining again syncs the group's links), has_tools and has_layers (they name which of those given were there), docker_missing (Docker is optional, so it never says to install it). Co-Authored-By: Claude Opus 5.5 <[email protected]>
49 lines
1.2 KiB
Plaintext
49 lines
1.2 KiB
Plaintext
# devvm limactl: limactl in devvm's place, on devvm's own Lima home
|
|
# (whatever LIMA_HOME says), run from devvm's data folder; its arguments,
|
|
# flags included, its input and its exit code pass through.
|
|
env LIMA_HOME=/elsewhere
|
|
|
|
exec devvm limactl list -q
|
|
stub_calls
|
|
cmp stdout calls
|
|
exec sh -c 'cat "$STUB_DIR/limactl-env"'
|
|
stdout '^cwd=\S*/data/devvm LIMA_HOME=\S*/lima$'
|
|
! stdout elsewhere
|
|
|
|
# A limactl that echoes what it got and exits 7.
|
|
chmod 0755 $WORK/bin/limactl
|
|
env PATH=$WORK/bin${:}$PATH
|
|
stdin input
|
|
! exec devvm limactl shell --start --workdir / devvm-web-x bash -s
|
|
cmpenv stdout got
|
|
exec sh -c 'devvm limactl --version </dev/null; echo "rc=$?"'
|
|
stdout '^args=--version$'
|
|
stdout '^rc=7$'
|
|
! exec devvm limactl --help
|
|
stdout '^args=--help$'
|
|
|
|
# Without DEVVM_LIMA_HOME, devvm's Lima home is in its data folder.
|
|
env DEVVM_LIMA_HOME=
|
|
! exec devvm limactl list
|
|
stdout '^home=\S*/data/devvm/lima$'
|
|
|
|
# No Lima.
|
|
env PATH=$DEVVM_BIN
|
|
! exec devvm limactl list
|
|
stderr '^devvm: program_missing name=Lima program=limactl$'
|
|
|
|
-- calls --
|
|
limactl list -q
|
|
-- input --
|
|
echo hi
|
|
-- got --
|
|
args=shell --start --workdir / devvm-web-x bash -s
|
|
home=$DEVVM_LIMA_HOME
|
|
input=echo hi
|
|
-- bin/limactl --
|
|
#!/bin/sh
|
|
echo "args=$*"
|
|
echo "home=$LIMA_HOME"
|
|
echo "input=$(cat)"
|
|
exit 7
|