detailed versioning + no dest

This commit is contained in:
ari committed 2026-09-17 15:29:06 -04:00
1 parent 64ab08d891
commit 2d35fd973c
5 files changed
+14 -7

No files matched your search

+6 -1
View File
@@ -98,7 +98,7 @@ def "main migrate" [
# SAFETY: only ever reads from `source`; the original is never modified.
def "main migrate connections" [
source: string # existing flat HERMES_HOME to copy from (read-only)
dest: string # destination HERMES_HOME folder; ignored when --to-guest is set
dest: string = "" # destination HERMES_HOME folder; not required when --to-guest is set
--files: list<string> = [config.yaml auth.json .env] # files (relative to HERMES_HOME) to copy
--extra-dirs: list<string> = [connections] # subdirectories to copy when present
--rewrite-from: list<string> = [host.docker.internal fwdesk.lab.internal castle.hub.internal]
@@ -108,6 +108,11 @@ def "main migrate connections" [
--guest-user: string = "hermes"
--guest-dest: string = "/var/lib/hermes" # destination inside the guest; only used with --to-guest
] {
mut to_guest = $to_guest
if $dest == "" {
$to_guest = true
note "no <dest> given — assuming --to-guest (streaming into the running guest)"
}
if not ($source | path exists) { die $"source path does not exist: ($source)" }
if ($rewrite_from | length) != ($rewrite_to | length) {
die "--rewrite-from and --rewrite-to must have the same length"