1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 22:04:44 +00:00

quote diff command arguments (#203)

This commit is contained in:
deadc0de6
2020-01-26 11:21:14 +01:00
parent 98911550df
commit 40a9872f56

View File

@@ -71,10 +71,10 @@ def shell(cmd, debug=False):
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"""
if not diff_cmd:
diff_cmd = 'diff -r {0} {1}'
diff_cmd = 'diff -r "{0}" "{1}"'
cmd = diff_cmd.format(original, modified)
_, out = run(shlex.split(cmd), raw=raw, debug=debug)
return out