mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 21:36:40 -10:00
Rewrites the messages outside the prompt, network policy, secrets, project folder, .git, --clone, backend, host, image, build and shared tool groups (agent_, ssh_, ports_, size_, disk_, vm_, no_, devcontainer_ and the rest) as full sentences: what happened first, then one action as a command, without chained colons and semicolons. Status steps and short ==> result lines stay as they are, and every template keeps its fields. Adds doc links for the actionable warnings and errors that had none: no_devcontainer_flag_ignored, no_ssh_agent, ssh_agent_empty, load_key_with, no_vm_ssh_agent, agent_key_not_found, agent_load_failed, agent_start_failed, mounts_next_start, no_feature, no_image_named, no_image_named_from, not_an_image, no_vm, no_vm_size, no_vm_ports, no_vm_git_protect, no_vm_policy, no_token, bad_secret_service, start_failed, stop_failed, delete_failed, vm_create_failed, sync_failed and pack_failed. msg_unknown's wording is checked by TestValuesAsGiven and msg.txtar, which follow it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
39 lines
1.2 KiB
Plaintext
39 lines
1.2 KiB
Plaintext
# devvm _msg prints a message's text.
|
|
exec devvm _msg msg_unknown name=x
|
|
stdout '^There''s no message x\.$'
|
|
! stderr .
|
|
|
|
# Values are kept as given, spaces and = included.
|
|
exec devvm _msg msg_unknown 'name=a b=c'
|
|
stdout '^There''s no message a b=c\.$'
|
|
|
|
# Names mode doesn't change _msg's text.
|
|
env DEVVM_MESSAGES=names
|
|
exec devvm _msg msg_unknown name=x
|
|
stdout '^There''s no message x\.$'
|
|
|
|
# Its errors are messages too: an unknown message, a missing, unexpected or
|
|
# repeated value, an argument that isn't name=value.
|
|
! exec devvm _msg nope
|
|
stderr '^devvm: msg_unknown name=nope$'
|
|
! stdout .
|
|
! exec devvm _msg msg_unknown
|
|
stderr 'msg_missing_value key=name name=msg_unknown$'
|
|
! exec devvm _msg msg_unknown name=x vm=y
|
|
stderr 'msg_unexpected_value key=vm name=msg_unknown$'
|
|
! exec devvm _msg msg_unknown name=x name=y
|
|
stderr 'msg_repeated_value key=name$'
|
|
! exec devvm _msg msg_unknown x
|
|
stderr 'msg_not_pair arg=x$'
|
|
! exec devvm _msg
|
|
stderr '^devvm: usage_error reason=requires at least 1 arg\(s\), only received 0$'
|
|
|
|
# Without names mode, errors are the text.
|
|
env DEVVM_MESSAGES=
|
|
! exec devvm _msg nope
|
|
stderr '^devvm: There''s no message nope\.$'
|
|
|
|
# _msg isn't in the help.
|
|
exec devvm --help
|
|
! stdout _msg
|