From d0e8385c35f17dde152449ce32d280c06d51ee74 Mon Sep 17 00:00:00 2001 From: Minionguyjpro Date: Sun, 13 Oct 2024 08:16:27 +0200 Subject: [PATCH] Retry at version fix for Inno Setup build part --- .github/workflows/build.yml | 5 +---- src/WinUEFI.py | 14 +++++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 206aab8..3cc0563 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,10 +77,6 @@ jobs: run: mkdir build shell: cmd - - name: Set VERSION environment variable - run: set VERSION=${{ needs.set_version.outputs.version }} - shell: cmd - - name: Download artifact uses: actions/download-artifact@v3 with: @@ -89,6 +85,7 @@ jobs: - name: Build the EXE installer run: | + set VERSION=${{ needs.set_version.outputs.version }} "%programfiles(x86)%\Inno Setup 6\iscc.exe" "${{ github.workspace }}\src\WinUEFI-setup.iss" shell: cmd diff --git a/src/WinUEFI.py b/src/WinUEFI.py index af7dead..0d4d20d 100644 --- a/src/WinUEFI.py +++ b/src/WinUEFI.py @@ -1,8 +1,12 @@ import sys import os -if os.name != 'nt': - print('Not running on a Windows platform! Exiting...') - sys.exit() -if os.name == 'nt': - os.system('shutdown /fw /f /r /t 00') \ No newline at end of file +try: + if os.name == 'nt': + os.system('shutdown /fw /f /r /t 00') + else: + print('Not running on a Windows platform! Exiting...') + sys.exit() +except Exception as e: + print(f'An error occurred: {e}') + sys.exit() \ No newline at end of file