From 073f30c8c9fb95087de1c1babbe731332e0f2a9b Mon Sep 17 00:00:00 2001 From: Sam Deane Date: Wed, 4 Sep 2024 22:38:43 +0100 Subject: [PATCH] Cleaner error reporting --- .vscode/launch.json | 21 +++++++++++++++------ Sources/ReleaseTools/RootCommand.swift | 4 ++++ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 6559e31..9324b97 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -3,12 +3,8 @@ { "type": "swift-lldb", "request": "launch", - "args": [ - "archive", - "--platform=macOS", - "--verbose" - ], - "cwd": "${workspaceFolder:ReleaseTools}/../stack/", + "args": [], + "cwd": "${workspaceFolder:ReleaseTools}", "name": "Debug rt", "program": "${workspaceFolder:ReleaseTools}/.build/debug/rt", "preLaunchTask": "swift: Build Debug rt" @@ -22,5 +18,18 @@ "program": "${workspaceFolder:ReleaseTools}/.build/release/rt", "preLaunchTask": "swift: Build Release rt" }, + { + "type": "swift-lldb", + "request": "launch", + "args": [ + "archive", + "--platform=macOS", + "--show-output" + ], + "cwd": "${workspaceFolder:ReleaseTools}/../Stack", + "name": "Debug -- Stack", + "program": "${workspaceFolder:ReleaseTools}/.build/debug/rt", + "preLaunchTask": "swift: Build Debug rt" + }, ] } \ No newline at end of file diff --git a/Sources/ReleaseTools/RootCommand.swift b/Sources/ReleaseTools/RootCommand.swift index 7226e8d..56a4e73 100644 --- a/Sources/ReleaseTools/RootCommand.swift +++ b/Sources/ReleaseTools/RootCommand.swift @@ -66,4 +66,8 @@ struct RootCommand: AsyncParsableCommand { exit(withError: error) } } + + /// Error label - adds some extra newlines to separate the error message from the rest of the output. + public static var _errorLabel: String { "\n\nError" } + }