Skip to content

Commit

Permalink
Ensure R directory is present before attempting to update package mir…
Browse files Browse the repository at this point in the history
…ror config (microsoft#4332)
  • Loading branch information
jonnyry authored Feb 6, 2025
1 parent 8153f8e commit a73cf2f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ BUG FIXES:
* Fix Azure ML network tags to use name rather than ID ([[#4151](https://github.com/microsoft/AzureTRE/issues/4151)])
* Windows R version must be 4.1.2 otherwise post install script doesn't update package mirror URL ([#4288](https://github.com/microsoft/AzureTRE/issues/4288))
* Recreate tre_output.json if empty. ([[#4292](https://github.com/microsoft/AzureTRE/issues/4292)])
* Ensure R directory is present before attempting to update package mirror URL ([#4332](https://github.com/microsoft/AzureTRE/pull/4332))

COMPONENTS:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
schemaVersion: 1.0.0
name: tre-service-guacamole-windowsvm
version: 1.2.5
version: 1.2.6
description: "An Azure TRE User Resource Template for Guacamole (Windows 10)"
dockerfile: Dockerfile.tmpl
registry: azuretre
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ local({
"@

$RBasePath = "$Env:ProgramFiles\R"
$RVersions = Get-ChildItem -Path $RBasePath -Directory | Where-Object { $_.Name -like "R-*" }

foreach ($RVersion in $RVersions) {
$ConfigPath = Join-Path -Path $RVersion.FullName -ChildPath "etc\Rprofile.site"
$RConfig | Out-File -Encoding Ascii (New-Item -Path $ConfigPath -Force)
if (Test-Path $RBasePath) {
$RVersions = Get-ChildItem -Path $RBasePath -Directory | Where-Object { $_.Name -like "R-*" }

foreach ($RVersion in $RVersions) {
$ConfigPath = Join-Path -Path $RVersion.FullName -ChildPath "etc\Rprofile.site"
$RConfig | Out-File -Encoding Ascii (New-Item -Path $ConfigPath -Force)
}
}

0 comments on commit a73cf2f

Please sign in to comment.