144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
# File 'lib/command/diff.rb', line 144
def exec_difftool(id)
temp_paths = create_temp_files(id) or return
diff_cmd = create_difftool_command_string(*temp_paths.map { |temp|
path = temp.path
if Helper.os_windows?
path.encode!(Encoding::Windows_31J)
end
%!"#{path}"!
})
begin
res = Helper::AsyncCommand.exec(diff_cmd)
rescue Errno::ENOENT => e
error e.message
exit Narou::EXIT_ERROR_CODE
ensure
temp_paths.map(&:delete)
end
puts res[0] unless res[0].empty?
error res[1] unless res[1].empty?
end
|