mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-11 13:09:18 +00:00
quote diff command arguments (#203)
This commit is contained in:
@@ -71,10 +71,10 @@ def shell(cmd, debug=False):
|
|||||||
|
|
||||||
|
|
||||||
def diff(original, modified, raw=True,
|
def diff(original, modified, raw=True,
|
||||||
diff_cmd='diff -r {0} {1}', debug=False):
|
diff_cmd='diff -r "{0}" "{1}"', debug=False):
|
||||||
"""compare two files"""
|
"""compare two files"""
|
||||||
if not diff_cmd:
|
if not diff_cmd:
|
||||||
diff_cmd = 'diff -r {0} {1}'
|
diff_cmd = 'diff -r "{0}" "{1}"'
|
||||||
cmd = diff_cmd.format(original, modified)
|
cmd = diff_cmd.format(original, modified)
|
||||||
_, out = run(shlex.split(cmd), raw=raw, debug=debug)
|
_, out = run(shlex.split(cmd), raw=raw, debug=debug)
|
||||||
return out
|
return out
|
||||||
|
|||||||
Reference in New Issue
Block a user