#631: remove -D on server add #448

Manually merged
coop-cloud merged 2 commits from ammaratef45/abra:removeDomainCheck into main 2024-11-27 19:48:32 +00:00

View File

@ -115,17 +115,10 @@ You can then add a server like so:
If "--local" is passed, then Abra assumes that the current local server is If "--local" is passed, then Abra assumes that the current local server is
intended as the target server. This is useful when you want to have your entire intended as the target server. This is useful when you want to have your entire
Co-op Cloud config located on the server itself, and not on your local Co-op Cloud config located on the server itself, and not on your local
developer machine. The domain is then set to "default". developer machine. The domain is then set to "default".`,
You can also pass "--no-domain-checks/-D" flag to use any arbitrary name
instead of a real domain. The host will be resolved with the "Hostname" entry
of your ~/.ssh/config. Checks for a valid online domain will be skipped:
abra server add -D example`,
Flags: []cli.Flag{ Flags: []cli.Flag{
ammaratef45 marked this conversation as resolved Outdated

Might seem like a nitpick but this "`" needs to be on the same line as the "default" or else a newline is created in the help output of abra which is inconsistent with the rest of the commands as far as I remember 🙃

Might seem like a nitpick but this "\`" needs to be on the same line as the `"default"` or else a newline is created in the help output of `abra` which is inconsistent with the rest of the commands as far as I remember 🙃

Ah, mia culpa

Ah, mia culpa
internal.DebugFlag, internal.DebugFlag,
internal.NoInputFlag, internal.NoInputFlag,
internal.NoDomainChecksFlag,
localFlag, localFlag,
}, },
Before: internal.SubCommandBefore, Before: internal.SubCommandBefore,
@ -170,10 +163,8 @@ of your ~/.ssh/config. Checks for a valid online domain will be skipped:
return nil return nil
} }
if !internal.NoDomainChecks { if _, err := dns.EnsureIPv4(name); err != nil {
if _, err := dns.EnsureIPv4(name); err != nil { log.Warn(err)
log.Fatal(err)
}
} }
_, err := createServerDir(name) _, err := createServerDir(name)