Skip to content

Commit 310eca1

Browse files
authored
Merge pull request #1705 from craddm/platform-path
Improve handling of spaces in file paths
2 parents eed7df2 + 133b583 commit 310eca1

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

deployment/administration/SRE_SRD_Remote_Diagnostics.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if ($?) {
3939

4040
# Run remote diagnostic scripts
4141
# -----------------------------
42-
Invoke-Expression -Command "$(Join-Path $PSScriptRoot '..' 'secure_research_environment' 'setup' 'Run_SRE_SRD_Remote_Diagnostics.ps1') -shmId $shmId -sreId $sreId -ipLastOctet $ipLastOctet"
42+
& $(Join-Path $PSScriptRoot '..' 'secure_research_environment' 'setup' 'Run_SRE_SRD_Remote_Diagnostics.ps1') -shmId $shmId -sreId $sreId -ipLastOctet $ipLastOctet
4343

4444

4545
# Get LDAP secret from the Key Vault

deployment/administration/SRE_Teardown.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ $scriptPath = Join-Path $PSScriptRoot ".." "secure_research_environment" "setup"
8383
if ($dryRun.IsPresent) {
8484
Add-LogMessage -Level Info "SRE data would be removed from the SHM by running: $scriptPath -shmId $shmId -sreId $sreId"
8585
} else {
86-
Invoke-Expression -Command "$scriptPath -shmId $shmId -sreId $sreId"
86+
& $scriptPath -shmId $shmId -sreId $sreId
8787
}
8888

8989

deployment/secure_research_environment/setup/Apply_SRE_Network_Configuration.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ foreach ($nsgName in $nsgs.Keys) {
110110
# Ensure SRE is peered to correct mirror/proxy set
111111
# ------------------------------------------------
112112
# Unpeer any existing networks before (re-)establishing correct peering for SRE
113-
Invoke-Expression -Command "$(Join-Path $PSScriptRoot Unpeer_SRE_Package_Repositories.ps1) -shmId $shmId -sreId $sreId"
113+
& $(Join-Path $PSScriptRoot "Unpeer_SRE_Package_Repositories.ps1") -shmId $shmID -sreId $sreId
114114
# Peer this SRE to the repository network
115115
Add-LogMessage -Level Info "Ensuring SRE is peered to correct package repository..."
116116
if (-not $config.sre.repositories.network.name) {
@@ -146,8 +146,7 @@ $null = Set-AzContext -SubscriptionId $config.sre.subscriptionName -ErrorAction
146146

147147
# Block external DNS queries
148148
# --------------------------
149-
Invoke-Expression -Command "$(Join-Path $PSScriptRoot "Configure_External_DNS_Queries.ps1") -shmId $shmId -sreId $sreId"
150-
149+
& $(Join-Path $PSScriptRoot "Configure_External_DNS_Queries.ps1") -shmId $shmId -sreId $sreId
151150

152151
# Switch back to original subscription
153152
# ------------------------------------

0 commit comments

Comments
 (0)