From 94d377797c1023db5427e58b0d14907946516ec0 Mon Sep 17 00:00:00 2001 From: Matt Wrock Date: Fri, 10 Jan 2025 17:11:41 -0800 Subject: [PATCH 1/2] powershell workaround for hab studio rm with powershell 7.5 and older windows os Signed-off-by: Matt Wrock --- components/studio/bin/hab-studio.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/studio/bin/hab-studio.ps1 b/components/studio/bin/hab-studio.ps1 index 5aab8a2ea9..a5f4540846 100644 --- a/components/studio/bin/hab-studio.ps1 +++ b/components/studio/bin/hab-studio.ps1 @@ -521,7 +521,8 @@ function Remove-Studio { } else { if(Test-Path $HAB_STUDIO_ROOT) { Write-HabInfo "Destroying Studio at $HAB_STUDIO_ROOT" - Remove-Item $HAB_STUDIO_ROOT -Recurse -Force + Get-ChildItem $HAB_STUDIO_ROOT -Recurse | Remove-Item -force -Recurse + Remove-Item $HAB_STUDIO_ROOT } } } From 9980b43a5ecc6a6c5830767ba3383a3821c36c34 Mon Sep 17 00:00:00 2001 From: Matt Wrock Date: Fri, 10 Jan 2025 21:59:15 -0800 Subject: [PATCH 2/2] fix script linting Signed-off-by: Matt Wrock --- components/studio/bin/hab-studio.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/studio/bin/hab-studio.ps1 b/components/studio/bin/hab-studio.ps1 index a5f4540846..b6092c8b24 100644 --- a/components/studio/bin/hab-studio.ps1 +++ b/components/studio/bin/hab-studio.ps1 @@ -521,7 +521,7 @@ function Remove-Studio { } else { if(Test-Path $HAB_STUDIO_ROOT) { Write-HabInfo "Destroying Studio at $HAB_STUDIO_ROOT" - Get-ChildItem $HAB_STUDIO_ROOT -Recurse | Remove-Item -force -Recurse + Get-ChildItem $HAB_STUDIO_ROOT -Recurse | Remove-Item -Force -Recurse Remove-Item $HAB_STUDIO_ROOT } }