Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7064287

Browse files
committedAug 28, 2024·
feat: powershell respects NoModifyPath from env
This is supported from the environment in the shell installer, but was previously only supported on the CLI in the powershell installer. This will be useful to ensure axoupdater tests don't pollute the environment: axodotdev/axoupdater#168 refs #1374.
1 parent 3bb2618 commit 7064287

37 files changed

+190
-0
lines changed
 

‎cargo-dist/templates/installer/installer.ps1.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,11 @@ function Invoke-Installer($artifacts, $platforms) {
359359
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
360360
[IO.File]::WriteAllLines("$receipt_home/{{ app_name }}-receipt.json", "$receipt", $Utf8NoBomEncoding)
361361

362+
# Respect the environment, but CLI takes precedence
363+
if ($null -eq $NoModifyPath) {
364+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
365+
}
366+
362367
Write-Information "{{ install_success_msg }}"
363368
if (-not $NoModifyPath) {
364369
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/akaikatana_basic.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,11 @@ function Invoke-Installer($artifacts, $platforms) {
15161516
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15171517
[IO.File]::WriteAllLines("$receipt_home/akaikatana-repack-receipt.json", "$receipt", $Utf8NoBomEncoding)
15181518

1519+
# Respect the environment, but CLI takes precedence
1520+
if ($null -eq $NoModifyPath) {
1521+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1522+
}
1523+
15191524
Write-Information "everything's installed!"
15201525
if (-not $NoModifyPath) {
15211526
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/akaikatana_one_alias_among_many_binaries.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1546,6 +1546,11 @@ function Invoke-Installer($artifacts, $platforms) {
15461546
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15471547
[IO.File]::WriteAllLines("$receipt_home/akaikatana-repack-receipt.json", "$receipt", $Utf8NoBomEncoding)
15481548

1549+
# Respect the environment, but CLI takes precedence
1550+
if ($null -eq $NoModifyPath) {
1551+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1552+
}
1553+
15491554
Write-Information "everything's installed!"
15501555
if (-not $NoModifyPath) {
15511556
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/akaikatana_two_bin_aliases.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1572,6 +1572,11 @@ function Invoke-Installer($artifacts, $platforms) {
15721572
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15731573
[IO.File]::WriteAllLines("$receipt_home/akaikatana-repack-receipt.json", "$receipt", $Utf8NoBomEncoding)
15741574

1575+
# Respect the environment, but CLI takes precedence
1576+
if ($null -eq $NoModifyPath) {
1577+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1578+
}
1579+
15751580
Write-Information "everything's installed!"
15761581
if (-not $NoModifyPath) {
15771582
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/akaikatana_updaters.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,6 +1524,11 @@ function Invoke-Installer($artifacts, $platforms) {
15241524
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15251525
[IO.File]::WriteAllLines("$receipt_home/akaikatana-repack-receipt.json", "$receipt", $Utf8NoBomEncoding)
15261526

1527+
# Respect the environment, but CLI takes precedence
1528+
if ($null -eq $NoModifyPath) {
1529+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1530+
}
1531+
15271532
Write-Information "everything's installed!"
15281533
if (-not $NoModifyPath) {
15291534
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_abyss.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,11 @@ function Invoke-Installer($artifacts, $platforms) {
15161516
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15171517
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15181518

1519+
# Respect the environment, but CLI takes precedence
1520+
if ($null -eq $NoModifyPath) {
1521+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1522+
}
1523+
15191524
Write-Information "everything's installed!"
15201525
if (-not $NoModifyPath) {
15211526
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_abyss_only.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,11 @@ function Invoke-Installer($artifacts, $platforms) {
15161516
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15171517
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15181518

1519+
# Respect the environment, but CLI takes precedence
1520+
if ($null -eq $NoModifyPath) {
1521+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1522+
}
1523+
15191524
Write-Information "everything's installed!"
15201525
if (-not $NoModifyPath) {
15211526
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_alias.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1546,6 +1546,11 @@ function Invoke-Installer($artifacts, $platforms) {
15461546
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15471547
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15481548

1549+
# Respect the environment, but CLI takes precedence
1550+
if ($null -eq $NoModifyPath) {
1551+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1552+
}
1553+
15491554
Write-Information "everything's installed!"
15501555
if (-not $NoModifyPath) {
15511556
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_alias_ignores_missing_bins.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,6 +1550,11 @@ function Invoke-Installer($artifacts, $platforms) {
15501550
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15511551
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15521552

1553+
# Respect the environment, but CLI takes precedence
1554+
if ($null -eq $NoModifyPath) {
1555+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1556+
}
1557+
15531558
Write-Information "everything's installed!"
15541559
if (-not $NoModifyPath) {
15551560
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_basic.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,11 @@ function Invoke-Installer($artifacts, $platforms) {
15161516
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15171517
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15181518

1519+
# Respect the environment, but CLI takes precedence
1520+
if ($null -eq $NoModifyPath) {
1521+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1522+
}
1523+
15191524
Write-Information ">o_o< everything's installed!"
15201525
if (-not $NoModifyPath) {
15211526
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_basic_lies.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,6 +1519,11 @@ function Invoke-Installer($artifacts, $platforms) {
15191519
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15201520
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15211521

1522+
# Respect the environment, but CLI takes precedence
1523+
if ($null -eq $NoModifyPath) {
1524+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1525+
}
1526+
15221527
Write-Information "everything's installed!"
15231528
if (-not $NoModifyPath) {
15241529
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_build_setup_steps.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,11 @@ function Invoke-Installer($artifacts, $platforms) {
15161516
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15171517
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15181518

1519+
# Respect the environment, but CLI takes precedence
1520+
if ($null -eq $NoModifyPath) {
1521+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1522+
}
1523+
15191524
Write-Information ">o_o< everything's installed!"
15201525
if (-not $NoModifyPath) {
15211526
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_disable_source_tarball.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,11 @@ function Invoke-Installer($artifacts, $platforms) {
15161516
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15171517
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15181518

1519+
# Respect the environment, but CLI takes precedence
1520+
if ($null -eq $NoModifyPath) {
1521+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1522+
}
1523+
15191524
Write-Information "everything's installed!"
15201525
if (-not $NoModifyPath) {
15211526
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_edit_existing.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,11 @@ function Invoke-Installer($artifacts, $platforms) {
15161516
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15171517
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15181518

1519+
# Respect the environment, but CLI takes precedence
1520+
if ($null -eq $NoModifyPath) {
1521+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1522+
}
1523+
15191524
Write-Information "everything's installed!"
15201525
if (-not $NoModifyPath) {
15211526
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_generic_workspace_basic.snap

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,6 +1515,11 @@ function Invoke-Installer($artifacts, $platforms) {
15151515
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15161516
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-js-receipt.json", "$receipt", $Utf8NoBomEncoding)
15171517

1518+
# Respect the environment, but CLI takes precedence
1519+
if ($null -eq $NoModifyPath) {
1520+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1521+
}
1522+
15181523
Write-Information ">o_o< everything's installed!"
15191524
if (-not $NoModifyPath) {
15201525
Add-Ci-Path $dest_dir
@@ -3158,6 +3163,11 @@ function Invoke-Installer($artifacts, $platforms) {
31583163
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
31593164
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
31603165

3166+
# Respect the environment, but CLI takes precedence
3167+
if ($null -eq $NoModifyPath) {
3168+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
3169+
}
3170+
31613171
Write-Information ">o_o< everything's installed!"
31623172
if (-not $NoModifyPath) {
31633173
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_homebrew_packages.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,11 @@ function Invoke-Installer($artifacts, $platforms) {
15161516
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15171517
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15181518

1519+
# Respect the environment, but CLI takes precedence
1520+
if ($null -eq $NoModifyPath) {
1521+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1522+
}
1523+
15191524
Write-Information "everything's installed!"
15201525
if (-not $NoModifyPath) {
15211526
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_no_homebrew_publish.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,11 @@ function Invoke-Installer($artifacts, $platforms) {
15161516
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15171517
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15181518

1519+
# Respect the environment, but CLI takes precedence
1520+
if ($null -eq $NoModifyPath) {
1521+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1522+
}
1523+
15191524
Write-Information "everything's installed!"
15201525
if (-not $NoModifyPath) {
15211526
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_several_aliases.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,6 +1550,11 @@ function Invoke-Installer($artifacts, $platforms) {
15501550
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15511551
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15521552

1553+
# Respect the environment, but CLI takes precedence
1554+
if ($null -eq $NoModifyPath) {
1555+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1556+
}
1557+
15531558
Write-Information "everything's installed!"
15541559
if (-not $NoModifyPath) {
15551560
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_ssldotcom_windows_sign.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,6 +1451,11 @@ function Invoke-Installer($artifacts, $platforms) {
14511451
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
14521452
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
14531453

1454+
# Respect the environment, but CLI takes precedence
1455+
if ($null -eq $NoModifyPath) {
1456+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1457+
}
1458+
14541459
Write-Information "everything's installed!"
14551460
if (-not $NoModifyPath) {
14561461
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_ssldotcom_windows_sign_prod.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,6 +1451,11 @@ function Invoke-Installer($artifacts, $platforms) {
14511451
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
14521452
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
14531453

1454+
# Respect the environment, but CLI takes precedence
1455+
if ($null -eq $NoModifyPath) {
1456+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1457+
}
1458+
14541459
Write-Information "everything's installed!"
14551460
if (-not $NoModifyPath) {
14561461
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_updaters.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,6 +1524,11 @@ function Invoke-Installer($artifacts, $platforms) {
15241524
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15251525
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15261526

1527+
# Respect the environment, but CLI takes precedence
1528+
if ($null -eq $NoModifyPath) {
1529+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1530+
}
1531+
15271532
Write-Information "everything's installed!"
15281533
if (-not $NoModifyPath) {
15291534
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_user_global_build_job.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,11 @@ function Invoke-Installer($artifacts, $platforms) {
15161516
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15171517
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15181518

1519+
# Respect the environment, but CLI takes precedence
1520+
if ($null -eq $NoModifyPath) {
1521+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1522+
}
1523+
15191524
Write-Information "everything's installed!"
15201525
if (-not $NoModifyPath) {
15211526
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_user_host_job.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,11 @@ function Invoke-Installer($artifacts, $platforms) {
15161516
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15171517
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15181518

1519+
# Respect the environment, but CLI takes precedence
1520+
if ($null -eq $NoModifyPath) {
1521+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1522+
}
1523+
15191524
Write-Information "everything's installed!"
15201525
if (-not $NoModifyPath) {
15211526
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_user_local_build_job.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,11 @@ function Invoke-Installer($artifacts, $platforms) {
15161516
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15171517
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15181518

1519+
# Respect the environment, but CLI takes precedence
1520+
if ($null -eq $NoModifyPath) {
1521+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1522+
}
1523+
15191524
Write-Information "everything's installed!"
15201525
if (-not $NoModifyPath) {
15211526
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_user_plan_job.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,11 @@ function Invoke-Installer($artifacts, $platforms) {
15161516
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15171517
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15181518

1519+
# Respect the environment, but CLI takes precedence
1520+
if ($null -eq $NoModifyPath) {
1521+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1522+
}
1523+
15191524
Write-Information "everything's installed!"
15201525
if (-not $NoModifyPath) {
15211526
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/axolotlsay_user_publish_job.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,11 @@ function Invoke-Installer($artifacts, $platforms) {
15161516
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15171517
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15181518

1519+
# Respect the environment, but CLI takes precedence
1520+
if ($null -eq $NoModifyPath) {
1521+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1522+
}
1523+
15191524
Write-Information "everything's installed!"
15201525
if (-not $NoModifyPath) {
15211526
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/install_path_cargo_home.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,11 @@ function Invoke-Installer($artifacts, $platforms) {
15161516
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15171517
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15181518

1519+
# Respect the environment, but CLI takes precedence
1520+
if ($null -eq $NoModifyPath) {
1521+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1522+
}
1523+
15191524
Write-Information "everything's installed!"
15201525
if (-not $NoModifyPath) {
15211526
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/install_path_env_no_subdir.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,6 +1491,11 @@ $dest_dir = $env:CARGO_DIST_FORCE_INSTALL_DIR
14911491
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
14921492
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
14931493

1494+
# Respect the environment, but CLI takes precedence
1495+
if ($null -eq $NoModifyPath) {
1496+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1497+
}
1498+
14941499
Write-Information "everything's installed!"
14951500
if (-not $NoModifyPath) {
14961501
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/install_path_env_subdir.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,6 +1491,11 @@ $dest_dir = $env:CARGO_DIST_FORCE_INSTALL_DIR
14911491
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
14921492
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
14931493

1494+
# Respect the environment, but CLI takes precedence
1495+
if ($null -eq $NoModifyPath) {
1496+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1497+
}
1498+
14941499
Write-Information "everything's installed!"
14951500
if (-not $NoModifyPath) {
14961501
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/install_path_env_subdir_space.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,6 +1491,11 @@ $dest_dir = $env:CARGO_DIST_FORCE_INSTALL_DIR
14911491
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
14921492
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
14931493

1494+
# Respect the environment, but CLI takes precedence
1495+
if ($null -eq $NoModifyPath) {
1496+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1497+
}
1498+
14941499
Write-Information "everything's installed!"
14951500
if (-not $NoModifyPath) {
14961501
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/install_path_env_subdir_space_deeper.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,6 +1491,11 @@ $dest_dir = $env:CARGO_DIST_FORCE_INSTALL_DIR
14911491
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
14921492
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
14931493

1494+
# Respect the environment, but CLI takes precedence
1495+
if ($null -eq $NoModifyPath) {
1496+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1497+
}
1498+
14941499
Write-Information "everything's installed!"
14951500
if (-not $NoModifyPath) {
14961501
Add-Ci-Path $dest_dir

‎cargo-dist/tests/snapshots/install_path_fallback_no_env_var_set.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,6 +1512,11 @@ $dest_dir = $env:CARGO_DIST_FORCE_INSTALL_DIR
15121512
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
15131513
[IO.File]::WriteAllLines("$receipt_home/axolotlsay-receipt.json", "$receipt", $Utf8NoBomEncoding)
15141514

1515+
# Respect the environment, but CLI takes precedence
1516+
if ($null -eq $NoModifyPath) {
1517+
$NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH
1518+
}
1519+
15151520
Write-Information "everything's installed!"
15161521
if (-not $NoModifyPath) {
15171522
Add-Ci-Path $dest_dir

0 commit comments

Comments
 (0)
Please sign in to comment.