From d10118579317a094226883be74528197f19c682f Mon Sep 17 00:00:00 2001 From: jonnyry Date: Thu, 6 Feb 2025 14:06:23 +0000 Subject: [PATCH 1/2] Ensure R directory is present before attempting to update package mirror config --- CHANGELOG.md | 1 + .../guacamole-azure-windowsvm/porter.yaml | 2 +- .../guacamole-azure-windowsvm/terraform/vm_config.ps1 | 11 +++++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6ea6de28e..f149b41c0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 ([#TBC](https://github.com/microsoft/AzureTRE/pull/TBC)) COMPONENTS: diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/porter.yaml b/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/porter.yaml index 0f727c688b..f9056f0f0b 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/porter.yaml +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/porter.yaml @@ -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 diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/vm_config.ps1 b/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/vm_config.ps1 index 343ac0e33c..6664c652e8 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/vm_config.ps1 +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform/vm_config.ps1 @@ -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) + } } From d780153f211db192725a85e8539a17942f629214 Mon Sep 17 00:00:00 2001 From: jonnyry Date: Thu, 6 Feb 2025 14:11:15 +0000 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f149b41c0c..2c41d6f0ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,7 +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 ([#TBC](https://github.com/microsoft/AzureTRE/pull/TBC)) +* Ensure R directory is present before attempting to update package mirror URL ([#4332](https://github.com/microsoft/AzureTRE/pull/4332)) COMPONENTS: