File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -144,17 +144,17 @@ def run(argv):
144
144
iterable = diff
145
145
146
146
# print unified diff results to standard output stream
147
- # TODO: add support for text output to indicate that there was no diff found
148
- # TODO: ( see https://stackoverflow.com/a/661967 )
149
- has_output = False
147
+ has_diff = False
150
148
if args .color :
151
149
for line in iterable :
152
- has_output = True
150
+ has_diff = True
153
151
sys .stdout .write (color_unified_diff_line (line ))
154
152
else :
155
153
for line in iterable :
156
- has_output = True
154
+ has_diff = True
157
155
sys .stdout .write (line )
158
156
159
- if not has_output :
157
+ # if no difference was found, tell the user instead of
158
+ # simply closing with zero exit status code.
159
+ if not has_diff :
160
160
print ("[*] There is no difference between the files." )
You can’t perform that action at this time.
0 commit comments