From 2b65bda587e71da2900512c3474c442715b38fb3 Mon Sep 17 00:00:00 2001 From: hzqst <113660872@qq.com> Date: Sun, 25 Feb 2024 19:50:24 +0800 Subject: [PATCH] 1 --- .github/workflows/msbuild.yml | 13 +++++++++---- .github/workflows/msbuild_win7.yml | 18 ++++++++++++++---- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index feb4cdc..93024be 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -139,12 +139,17 @@ jobs: - name: Copy Build to Output working-directory: ${{env.GITHUB_WORKSPACE}} - run: | - for /f "delims=" %%i in ('where node') do set NODE_PATH=%%i - copy "%NODE_PATH%" "Output\node.exe" /y - xcopy "build" "Output" /y /e + run: xcopy "build" "Output" /y /e shell: cmd + - name: Copy node.exe + run: | + echo "Current PATH: $env:PATH" + $nodePath = (Get-Command node).Source + echo "Node.js path: $nodePath" + Copy-Item -Path $nodePath -Destination "${{env.GITHUB_WORKSPACE}}/Output/node.exe" -Force + shell: pwsh + - name: Checkout CGAssistantJS uses: hzqst/checkout@main with: diff --git a/.github/workflows/msbuild_win7.yml b/.github/workflows/msbuild_win7.yml index dd20eec..f74df27 100644 --- a/.github/workflows/msbuild_win7.yml +++ b/.github/workflows/msbuild_win7.yml @@ -118,6 +118,11 @@ jobs: node-version: '16' architecture: 'x86' + - name: Print Node.js version and path + run: | + node -v + where node + - name: Install node-gyp working-directory: ${{env.GITHUB_WORKSPACE}} run: npm install -g node-gyp @@ -139,12 +144,17 @@ jobs: - name: Copy Build to Output working-directory: ${{env.GITHUB_WORKSPACE}} - run: | - for /f "delims=" %%i in ('where node') do set NODE_PATH=%%i - copy "%NODE_PATH%" "Output\node.exe" /y - xcopy "build" "Output" /y /e + run: xcopy "build" "Output" /y /e shell: cmd + - name: Copy node.exe + run: | + echo "Current PATH: $env:PATH" + $nodePath = (Get-Command node).Source + echo "Node.js path: $nodePath" + Copy-Item -Path $nodePath -Destination "${{env.GITHUB_WORKSPACE}}/Output/node.exe" -Force + shell: pwsh + - name: Checkout CGAssistantJS uses: hzqst/checkout@main with: