mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-04-28 03:20:11 +00:00
fix(setup): escape printf %s in Sprintf template to fix format verb count (#1297)
The printf '%s\n' calls in shell code within the Go Sprintf template were being counted as format verbs, causing a build failure (10 verbs but 9 args). Using %%s produces literal %s in the output.
This commit is contained in:
parent
2f059e650e
commit
7530b66254
1 changed files with 2 additions and 2 deletions
|
|
@ -4392,7 +4392,7 @@ if [ -n "$SSH_SENSORS_PUBLIC_KEY" ]; then
|
|||
TMP_AUTH_KEYS="$(mktemp /tmp/.pulse-authorized-keys.XXXXXX 2>/dev/null)" || TMP_AUTH_KEYS=""
|
||||
if [ -n "$TMP_AUTH_KEYS" ] && [ -f "$TMP_AUTH_KEYS" ]; then
|
||||
grep -vF "# pulse-" "$AUTH_KEYS" > "$TMP_AUTH_KEYS" 2>/dev/null || true
|
||||
printf '%s\n' "$SSH_SENSORS_KEY_ENTRY" >> "$TMP_AUTH_KEYS"
|
||||
printf '%%s\n' "$SSH_SENSORS_KEY_ENTRY" >> "$TMP_AUTH_KEYS"
|
||||
chmod 600 "$TMP_AUTH_KEYS"
|
||||
if mv -f "$TMP_AUTH_KEYS" "$AUTH_KEYS" 2>/dev/null || cp -f "$TMP_AUTH_KEYS" "$AUTH_KEYS" 2>/dev/null; then
|
||||
rm -f "$TMP_AUTH_KEYS" 2>/dev/null
|
||||
|
|
@ -4405,7 +4405,7 @@ if [ -n "$SSH_SENSORS_PUBLIC_KEY" ]; then
|
|||
echo " ⚠️ Failed to create temp file — cannot update authorized_keys"
|
||||
fi
|
||||
else
|
||||
if printf '%s\n' "$SSH_SENSORS_KEY_ENTRY" >> "$AUTH_KEYS" 2>/dev/null; then
|
||||
if printf '%%s\n' "$SSH_SENSORS_KEY_ENTRY" >> "$AUTH_KEYS" 2>/dev/null; then
|
||||
chmod 600 "$AUTH_KEYS"
|
||||
SENSORS_KEY_OK=true
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue