File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed
test/unit-tests/toolchain Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -856,14 +856,18 @@ export class Swiftly {
856856 `Swift ${ version } post-install script executed successfully. Additional system packages have been installed.`
857857 ) ;
858858 } catch ( error ) {
859- const errorMsg = `Failed to execute post-install script: ${ error } ` ;
860- logger ?. error ( errorMsg ) ;
861- outputChannel . appendLine ( "" ) ;
862- outputChannel . appendLine ( `Error: ${ errorMsg } ` ) ;
863-
864- void vscode . window . showErrorMessage (
865- `Failed to execute post-install script for Swift ${ version } . Check the output channel for details.`
866- ) ;
859+ logger ?. error ( Error ( "Failed to execute post-install script" , { cause : error } ) ) ;
860+ void vscode . window
861+ . showErrorMessage (
862+ `Failed to execute post-install script for Swift ${ version } . See command output for more details.` ,
863+ "Show Command Output"
864+ )
865+ . then ( selected => {
866+ if ( ! selected ) {
867+ return ;
868+ }
869+ outputChannel . show ( ) ;
870+ } ) ;
867871 }
868872 }
869873
Original file line number Diff line number Diff line change @@ -1131,6 +1131,7 @@ apt-get -y install build-essential`;
11311131
11321132 // @ts -expect-error mocking vscode window methods makes type checking difficult
11331133 mockVscodeWindow . showWarningMessage . resolves ( "Execute Script" ) ;
1134+ mockVscodeWindow . showErrorMessage . resolves ( undefined ) ;
11341135
11351136 await Swiftly . installToolchain ( "6.0.0" , "/path/to/extension" ) ;
11361137
You can’t perform that action at this time.
0 commit comments