Skip to content

Commit 4255585

Browse files
GitHub Action on Windows no longer throws error, but now trying to fix a warning and a note.
The last update to R-CMD-check-windows.yaml left the JAGS installer executable in the package directory. The executable was flagged by R-CMD-check.
1 parent 7f123b9 commit 4255585

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/R-CMD-check-windows.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,23 @@ jobs:
3939
- name: Install JAGS (Windows)
4040
if: runner.os == 'Windows'
4141
run: |
42+
# Create a temporary directory for the installer
43+
$tempDir = Join-Path $env:RUNNER_TEMP "jags-installer"
44+
New-Item -ItemType Directory -Path $tempDir -Force
45+
46+
# Download JAGS to the temporary directory
47+
$installerPath = Join-Path $tempDir "JAGS-4.3.1.exe"
4248
curl -LO https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Windows/JAGS-4.3.1.exe
43-
Start-Process -FilePath "JAGS-4.3.1.exe" -ArgumentList "/S" -NoNewWindow -Wait
49+
Move-Item -Path "JAGS-4.3.1.exe" -Destination $installerPath
50+
51+
# Install JAGS
52+
Start-Process -FilePath $installerPath -ArgumentList "/S" -NoNewWindow -Wait
53+
54+
# Set environment variable
4455
echo "JAGS_HOME=C:/Program Files/JAGS/JAGS-4.3.1" >> $env:GITHUB_ENV
56+
57+
# Clean up the installer
58+
Remove-Item -Path $tempDir -Recurse -Force
4559
shell: pwsh
4660

4761
- name: Set up JAGS environment (Windows)

0 commit comments

Comments
 (0)