fix cwd on windows

This commit is contained in:
Ondrej Samohel 2021-02-02 17:58:57 +01:00
parent 1e0fb81314
commit 1117294b33
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
6 changed files with 20 additions and 4 deletions

View file

@ -46,6 +46,8 @@ function Install-Poetry() {
$current_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$pype_root = (Get-Item $current_dir).parent.FullName
Set-Location -Path $pype_root
$art = @"
@ -117,6 +119,6 @@ if (-not (Test-Path -PathType Leaf -Path "$($pype_root)\poetry.lock")) {
Write-Host "Updating virtual environment."
& poetry update
}
Set-Location -Path $current_dir
Write-Host ">>> " -NoNewline -ForegroundColor green
Write-Host "Virtual environment created. "

View file

@ -35,6 +35,7 @@ function Show-PSWarning() {
$current_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$pype_root = (Get-Item $current_dir).parent.FullName
Set-Location -Path $pype_root
$art = @"
@ -93,4 +94,5 @@ Write-Host "Generating zip from current sources ..."
Write-Host "... " -NoNewline -ForegroundColor Magenta
Write-Host "arguments: " -NoNewline -ForegroundColor Gray
Write-Host $ARGS -ForegroundColor White
& poetry run python "$($pype_root)\start.py" generate-zip $ARGS
& poetry run python "$($pype_root)\start.py" generate-zip $ARGS
Set-Location -Path $current_dir

View file

@ -16,6 +16,8 @@ PS> .\make_docs.ps1
$current_dir = Get-Location
$script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$pype_root = (Get-Item $script_dir).parent.FullName
Set-Location -Path $pype_root
$art = @"

View file

@ -13,5 +13,6 @@ PS> .\run_settings.ps1
$script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$pype_root = (Get-Item $script_dir).parent.FullName
Set-Location -Path $pype_root
& poetry run python "$($pype_root)\start.py" settings --dev
Set-Location -Path $current_dir

View file

@ -12,5 +12,7 @@ PS> .\run_tray.ps1
#>
$script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$pype_root = (Get-Item $script_dir).parent.FullName
Set-Location -Path $pype_root
& poetry run python "$($pype_root)\start.py" tray --debug
Set-Location -Path $current_dir

View file

@ -35,4 +35,11 @@ function Exit-WithCode($exitcode) {
exit $exitcode
}
git submodule update --recursive --remote
$current_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$pype_root = (Get-Item $current_dir).parent.FullName
Set-Location -Path $pype_root
git submodule update --recursive --remote
Set-Location -Path $current_dir