From ebffd85015d2aac610a0cc0e50e29728ed1a3eec Mon Sep 17 00:00:00 2001 From: Szymon Osiecki Date: Fri, 12 Jan 2024 16:21:33 +0100 Subject: [PATCH] refactor(ps): wsl_install - validate additional scopes --- wsl/wsl_install.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wsl/wsl_install.ps1 b/wsl/wsl_install.ps1 index 15430d1f..d44ec89f 100644 --- a/wsl/wsl_install.ps1 +++ b/wsl/wsl_install.ps1 @@ -32,6 +32,8 @@ wsl/wsl_install.ps1 -Distro 'Ubuntu' -FixNetwork # :set up WSL distro with specified installation scopes $Scope = @('python') $Scope = @('az', 'docker') +$Scope = @('az', 'docker', 'pwsh') +$Scope = @('az', 'docker', 'k8s_base', 'pwsh') wsl/wsl_install.ps1 -Distro 'Ubuntu' -s $Scope # :set up WSL distro and clone specified GitHub repositories $Repos = @('szymonos/linux-setup-scripts') @@ -42,7 +44,7 @@ param ( [Parameter(Mandatory, Position = 0)] [string]$Distro, - [ValidateScript({ $_.ForEach({ $_ -in @('az', 'docker', 'python') }) -notcontains $false })] + [ValidateScript({ $_.ForEach({ $_ -in @('az', 'docker', 'k8s_base', 'k8s_ext', 'oh_my_posh', 'pwsh', 'python', 'shell', 'zsh') }) -notcontains $false })] [string[]]$Scope, [ValidateScript({ $_.ForEach({ $_ -match '^[\w-]+/[\w-]+$' }) -notcontains $false })]