Fix bug in append()
when sudo was involved (?)
This commit is contained in:
parent
c0eed0e969
commit
7b939ec4a3
|
@ -120,7 +120,7 @@ def append(c, filename, text, use_sudo=False, partial=False, escape=True,
|
||||||
shell=shell)):
|
shell=shell)):
|
||||||
continue
|
continue
|
||||||
line = line.replace("'", r"'\\''") if escape else line
|
line = line.replace("'", r"'\\''") if escape else line
|
||||||
func("echo '%s' >> %s" % (line, _expand_path(c, filename)))
|
func("""bash -c "echo '%s' >> %s" """ % (line, _expand_path(c, filename)))
|
||||||
|
|
||||||
|
|
||||||
def _escape_for_regex(text):
|
def _escape_for_regex(text):
|
||||||
|
|
Loading…
Reference in a new issue