client/install-langtechdepot.sh writes the systemd unit with $BIN unquoted:
ExecStart=$BIN serve --no-browser --home "$CONFIG_DIR"
If $HOME contains a space, the rendered unit is:
ExecStart=/home/field user/.local/bin/syncthing serve --no-browser --home "/home/field user/.local/state/langtechdepot"
systemd reads that as the executable /home/field with user/.local/bin/syncthing as its first argument, so the service never starts. The --home value is quoted and survives; only the binary path is exposed.
Impact: low. Spaces in Linux home directories are rare. It becomes material if we do #8, because Mac home directories routinely contain them ("/Users/First Last"), so this is worth fixing before any Mac port rather than after.
Fix, and why I didn't just make it
Quoting the first token is valid — systemd's config_parse_exec() extracts it with extract_first_word_and_warn(…, EXTRACT_UNQUOTE|EXTRACT_CUNESCAPE, …), i.e. the executable path is unquoted the same way the arguments are, after any -/@/:/+ prefix characters are consumed:
ExecStart="$BIN" serve --no-browser --home "$CONFIG_DIR"
I left it alone because there is no systemd on the authoring machine to test against, and a malformed ExecStart would break every Linux install rather than only the rare one this fixes. That trade seemed worth a second pair of eyes rather than a blind edit. Whoever has a Linux box can confirm it in one go:
systemctl --user cat langtechdepot.service
systemctl --user status langtechdepot.service
One caveat if you do change it: EXTRACT_CUNESCAPE means systemd also C-unescapes the token, so a backslash in the path would need doubling. Irrelevant for real home directories, but it is the reason quoting alone isn't a general-purpose fix for arbitrary paths.
Same file, same class of bug as d048569 (which stopped the script guessing Syncthing's config location) — that commit quoted the paths it introduced, but this pre-existing one was left as found.
client/install-langtechdepot.shwrites the systemd unit with$BINunquoted:If
$HOMEcontains a space, the rendered unit is:systemd reads that as the executable
/home/fieldwithuser/.local/bin/syncthingas its first argument, so the service never starts. The--homevalue is quoted and survives; only the binary path is exposed.Impact: low. Spaces in Linux home directories are rare. It becomes material if we do #8, because Mac home directories routinely contain them ("/Users/First Last"), so this is worth fixing before any Mac port rather than after.
Fix, and why I didn't just make it
Quoting the first token is valid — systemd's
config_parse_exec()extracts it withextract_first_word_and_warn(…, EXTRACT_UNQUOTE|EXTRACT_CUNESCAPE, …), i.e. the executable path is unquoted the same way the arguments are, after any-/@/:/+prefix characters are consumed:I left it alone because there is no systemd on the authoring machine to test against, and a malformed
ExecStartwould break every Linux install rather than only the rare one this fixes. That trade seemed worth a second pair of eyes rather than a blind edit. Whoever has a Linux box can confirm it in one go:One caveat if you do change it:
EXTRACT_CUNESCAPEmeans systemd also C-unescapes the token, so a backslash in the path would need doubling. Irrelevant for real home directories, but it is the reason quoting alone isn't a general-purpose fix for arbitrary paths.Same file, same class of bug as d048569 (which stopped the script guessing Syncthing's config location) — that commit quoted the paths it introduced, but this pre-existing one was left as found.