extract_join_data() previously used `awk '{print $1}'` as its final
step, which only keeps the first whitespace-delimited chunk. Since the
join-data token is base64 and never legitimately contains whitespace,
any paste that gets hard-wrapped across multiple lines (long tokens
wrapped by a terminal or the panel UI, or CRLF line endings) was
silently truncated at the first space/newline, even when the raw
input already contained the rest of the token. This produced a valid
but incomplete base64 string that decoded into a config.yml missing
trailing fields such as `remote`, causing wings to fail at startup
with "invalid remote configuration, cannot connect to panel".
Now strips every whitespace character from the token instead of only
keeping the first token, so wrapped/multi-line pastes are captured in
full regardless of how prompt() received them.
Also bumps the installer banner to v1.3.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The panel now generates the auto-deploy command as
"calagopus-wings configure --join-data ..." instead of
"wings configure --join-data ...". extract_join_data() already handles
any prefix (it matches on the --join-data flag itself), so this is a
docs/prompt wording update only, keeping the on-screen instructions in
sync with what users actually copy from the panel.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
`prompt()` used a single `read -r`, which stops at the first newline.
If a pasted value (most notably join-data copied from the panel UI)
arrives with an embedded newline, everything after it was silently
dropped, and the leftover fragment would be consumed by the *next*
prompt instead. The truncated-but-still-valid-looking base64 could
still decode successfully, just missing trailing fields like `remote`,
producing a config.yml that fails at startup with "invalid remote
configuration, cannot connect to panel".
prompt() now drains any additional lines already buffered on the TTY
after the first read, so a multi-line paste is captured in full
without blocking on further keystrokes.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
wings configure now prompts to confirm overwriting an existing
config.yml. Under curl|bash stdin isn't a TTY, so the prompt fails
with "not a terminal" instead of writing the config. Add --override
to skip that prompt, since the installer already gets explicit user
confirmation via /dev/tty beforehand.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>