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: