manager: fix stray quote corrupting saved app profile templates#3571
Open
palazik wants to merge 1 commit into
Open
manager: fix stray quote corrupting saved app profile templates#3571palazik wants to merge 1 commit into
palazik wants to merge 1 commit into
Conversation
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.
ca5779c to
37aa887
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
setAppProfileTemplateinKsuCli.ktbuilds the ksud command as: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
ksudas part of the template argument.profile::set_templatethen writes that argument verbatim toPROFILE_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:
This matches the quoting used by the sibling helpers (
getAppProfileTemplate,deleteAppProfileTemplate).