Skip to content

manager: fix stray quote corrupting saved app profile templates#3571

Open
palazik wants to merge 1 commit into
tiann:mainfrom
palazik:fix/set-template-stray-quote
Open

manager: fix stray quote corrupting saved app profile templates#3571
palazik wants to merge 1 commit into
tiann:mainfrom
palazik:fix/set-template-stray-quote

Conversation

@palazik

@palazik palazik commented Jul 11, 2026

Copy link
Copy Markdown

Problem

setAppProfileTemplate in KsuCli.kt builds the ksud command as:

val cmd = """${getKsuDaemonPath()} profile set-template "$id" "$escapedTemplate'""""

Note the stray ' right before the closing ": "$escapedTemplate'".

Inside double quotes the single quote is a literal character, so it is not shell quoting — it gets passed through to ksud as part of the template argument. profile::set_template then writes that argument verbatim to PROFILE_TEMPLATE_DIR/<id>, so every template saved through the manager gains a spurious trailing ' in its content.

Fix

Remove the stray quote so the template is passed through unchanged:

val cmd = """${getKsuDaemonPath()} profile set-template "$id" "$escapedTemplate""""

This matches the quoting used by the sibling helpers (getAppProfileTemplate, deleteAppProfileTemplate).

setAppProfileTemplate built the ksud command as:

    ... profile set-template "$id" "$escapedTemplate'"

The trailing single quote before the closing double quote is not part of
the shell quoting, so it is passed through literally and appended to the
template content that ksud writes to disk. Every template saved through
the manager therefore gained a spurious `'` character.

Remove the stray quote so the template argument is passed unmodified.
@palazik palazik force-pushed the fix/set-template-stray-quote branch from ca5779c to 37aa887 Compare July 11, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant