__line fails, if line contains single/double quotes #275

Closed
opened 2021-11-20 15:23:08 +00:00 by ungleich-gitea · 6 comments

Created by: telmich

Single quotes could work, but double quotes cannot. need to find a way to output the line securely without getting it modified

*Created by: telmich* Single quotes could work, but double quotes cannot. need to find a way to output the line securely without getting it modified
Author
Owner

Created by: asteven

Just for reference. Issues like this one would also be reliably solved by #663.

*Created by: asteven* Just for reference. Issues like this one would also be reliably solved by #663.
Author
Owner

Created by: matthijskooijman

Seems like this is fixed and can be closed?

*Created by: matthijskooijman* Seems like this is fixed and can be closed?
Author
Owner

Created by: winduptoy

@darko-poljak @telmich #594 works for me.

*Created by: winduptoy* @darko-poljak @telmich #594 works for me.
Author
Owner

Created by: darko-poljak

@winduptoy Can you test a fix from PR: https://github.com/ungleich/cdist/pull/594

*Created by: darko-poljak* @winduptoy Can you test a fix from PR: https://github.com/ungleich/cdist/pull/594
Author
Owner

Created by: winduptoy

@telmich I'm having trouble with this one.

On remote machine, /etc/TEST.txt

Hello
Hello
dc_eximconfig_configtype='local'
Hello
Hello
echo __line /etc/TEST.txt --line "dc_eximconfig_configtype='local'" --state absent | cdist config --initial-manifest - -v myhost

leaves the file unchanged. Is there something I'm missing necessary to escape those single quotes?

*Created by: winduptoy* @telmich I'm having trouble with this one. On remote machine, `/etc/TEST.txt` ``` Hello Hello dc_eximconfig_configtype='local' Hello Hello ``` ``` echo __line /etc/TEST.txt --line "dc_eximconfig_configtype='local'" --state absent | cdist config --initial-manifest - -v myhost ``` leaves the file unchanged. Is there something I'm missing necessary to escape those single quotes?
Author
Owner

Created by: telmich

Fixed some time ago

*Created by: telmich* Fixed some time ago
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ungleich-public/cdist#275
No description provided.