@@ -219,6 +219,19 @@ class SCSHXPCService: NSObject, SCSHXPCServiceProtocol {
219
219
var temporaryThemeFile : URL ? = nil
220
220
221
221
defer {
222
+ if custom_settings. debug {
223
+ let log = URL ( fileURLWithPath: NSHomeDirectory ( ) , isDirectory: true ) . appendingPathComponent ( " Desktop/colorize.log " )
224
+
225
+ // Log the custom theme.
226
+ if let url = temporaryThemeFile, let s = try ? String ( contentsOf: url) {
227
+ try ? " \n \n ####### \n # Custom Theme: \n \( s) \n \n ####### " . append ( to: log)
228
+ }
229
+ // Log the custom style.
230
+ if let url = temporaryCSSFile, let s = try ? String ( contentsOf: url) {
231
+ try ? " \n \n ####### \n # Custom CSS: \n \( s) \n \n ####### " . append ( to: log)
232
+ }
233
+ }
234
+
222
235
if let url = temporaryCSSFile {
223
236
do {
224
237
// Delete the temporary css.
@@ -415,19 +428,6 @@ class SCSHXPCService: NSObject, SCSHXPCServiceProtocol {
415
428
416
429
let e = SCSHError . shellError ( cmd: cmd, exitCode: result. exitCode, stdOut: result. output ( ) ?? " " , stdErr: result. errorOutput ( ) ?? " " , message: " QLColorCode: colorize.sh failed with exit code \( result. exitCode) . Command was ( \( cmd) ). " )
417
430
418
- if custom_settings. debug {
419
- let log = URL ( fileURLWithPath: NSHomeDirectory ( ) , isDirectory: true ) . appendingPathComponent ( " Desktop/colorize.log " )
420
-
421
- // Log the custom theme.
422
- if let url = temporaryThemeFile, let s = try ? String ( contentsOf: url) {
423
- try ? " \n \n ####### \n # Custom Theme: \n \( s) \n \n ####### " . append ( to: log)
424
- }
425
- // Log the custom style.
426
- if let url = temporaryCSSFile, let s = try ? String ( contentsOf: url) {
427
- try ? " \n \n ####### \n # Custom CSS: \n \( s) \n \n ####### " . append ( to: log)
428
- }
429
- }
430
-
431
431
throw e
432
432
} else {
433
433
let final_settings = settings. overriding ( fromDictionary: [
0 commit comments