Skip to content

Commit

Permalink
Merge pull request #117 from szymonos/dev
Browse files Browse the repository at this point in the history
Merge dev to main
  • Loading branch information
szymonos authored Sep 26, 2023
2 parents afb5e1f + 378ff0c commit 92083ae
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
3 changes: 1 addition & 2 deletions .assets/provision/install_azurecli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ if ! conda env list | grep -qw '^azurecli'; then
if uname -r 2>&1 | grep -qw 'WSL2'; then
conda create --name azurecli --yes python=3.10 pip
else
# https://github.com/microsoft/WSL/issues/4020
# https://github.com/conda/conda/issues/12051
conda create --name azurecli --yes python=3.10 pip numpy-base
fi

fi
conda activate azurecli
pip install -U azure-cli
Expand Down
14 changes: 9 additions & 5 deletions wsl/wsl_certs_add.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,15 @@ begin {
# set location to workspace folder
Push-Location "$PSScriptRoot/.."
# clone/refresh szymonos/ps-modules repository
if (.assets/tools/gh_repo_clone.ps1 -OrgRepo 'szymonos/ps-modules') {
# import the do-common module for certificate functions
Import-Module -Name (Resolve-Path '../ps-modules/modules/do-common')
} else {
Write-Error 'Cloning ps-modules repository failed.'
try {
Import-Module do-common -MinimumVersion 0.27
} catch {
if (.assets/tools/gh_repo_clone.ps1 -OrgRepo 'szymonos/ps-modules') {
# import the do-common module for certificate functions
Import-Module -Name (Resolve-Path '../ps-modules/modules/do-common')
} else {
Write-Error 'Cloning ps-modules repository failed.'
}
}

# determine update ca parameters depending on distro
Expand Down
12 changes: 5 additions & 7 deletions wsl/wsl_setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,11 @@ process {
}
# *install PowerShell modules from ps-modules repository
if ($chk.shell) {
# ps-modules repo is being cloned/refreshed on adding certificates
if (-not $AddCertificate) {
if (.assets/tools/gh_repo_clone.ps1 -OrgRepo 'szymonos/ps-modules') {
Write-Verbose 'ps-modules repository cloned successfully.'
} else {
Write-Error 'Cloning ps-modules repository failed.'
}
# clone/refresh szymonos/ps-modules repository
if (.assets/tools/gh_repo_clone.ps1 -OrgRepo 'szymonos/ps-modules') {
Write-Verbose 'ps-modules repository cloned successfully.'
} else {
Write-Error 'Cloning ps-modules repository failed.'
}
Write-Host 'installing ps-modules...' -ForegroundColor Cyan
Write-Host "`e[3mAllUsers`e[23m : do-common" -ForegroundColor DarkGreen
Expand Down

0 comments on commit 92083ae

Please sign in to comment.