From 8c555eaf5aedc52688a94b53f640ddc3f7752ab9 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Mon, 26 Sep 2022 22:25:40 +0000 Subject: [PATCH] fix kiss-vscode fallback errors. Close #70 --- projects/kiss-vscode/src/Main.kiss | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/projects/kiss-vscode/src/Main.kiss b/projects/kiss-vscode/src/Main.kiss index 2f56f32f..cf398cad 100644 --- a/projects/kiss-vscode/src/Main.kiss +++ b/projects/kiss-vscode/src/Main.kiss @@ -38,18 +38,18 @@ (FileSystem.rename lastConfigDir activeConfigDir)) } (catch [e] (throw "failed to delete bad config: $e"))) + (#if test + // If there's a build error when testing, throw a test failure + (throw errorMessage) + // If there's a build error at runtime, tell the user + (showCompileError errorMessage)) // When user config fails to build, use the default // Counterintuitively, this unless is correct: (unless fallbackToDefault - (Vscode.window.showErrorMessage errorMessage) (warningMessage "Falling back to the default Kiss-VSCode Config") (unless config - (tryLoadConfig true))) - (#if test - // If there's a build error when testing, throw a test failure - (throw errorMessage) - // If there's a build error at runtime, tell the user - (showCompileError errorMessage)) + (tryLoadConfig false true))) + }] // Choose where to find the custom config