From 138e0156950cd5246c9eee17bc0658913b6aa793 Mon Sep 17 00:00:00 2001 From: Nikhil Dabas Date: Sun, 18 Jul 2021 11:31:51 +0530 Subject: [PATCH] Better error handling for shortcuts --- build.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.ps1 b/build.ps1 index 66eca34..eca4350 100644 --- a/build.ps1 +++ b/build.ps1 @@ -285,11 +285,11 @@ Section "Pico environment" SecPico ; Unconditionally create a shortcut for VS Code -- in case the user had it ; installed already, or if they install it later - CreateShortcut "`$INSTDIR\Visual Studio Code for Pico.lnk" "cmd.exe" '/c call "`$INSTDIR\pico-env.cmd" && code' + CreateShortcut "`$INSTDIR\Visual Studio Code for Pico.lnk" "cmd.exe" '/c (call "`$INSTDIR\pico-env.cmd" && code) || pause' ; SetOutPath is needed here to set the working directory for the shortcut SetOutPath "`$INSTDIR\pico-project-generator" - CreateShortcut "`$INSTDIR\Pico Project Generator.lnk" "cmd.exe" '/c call "`$INSTDIR\pico-env.cmd" && python "`$INSTDIR\pico-project-generator\pico_project.py" --gui' + CreateShortcut "`$INSTDIR\Pico Project Generator.lnk" "cmd.exe" '/c (call "`$INSTDIR\pico-env.cmd" && python "`$INSTDIR\pico-project-generator\pico_project.py" --gui) || pause' ; Reset working dir for pico-setup.cmd launched from the finish page SetOutPath "`$INSTDIR"