Skip to content

Commit

Permalink
Merge pull request #151 from szymonos/dev
Browse files Browse the repository at this point in the history
refactor(ps): wsl_install - validate additional scopes
  • Loading branch information
szymonos authored Jan 16, 2024
2 parents 83aae8a + ebffd85 commit 07af583
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wsl/wsl_install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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 })]
Expand Down

0 comments on commit 07af583

Please sign in to comment.