Better....

Better Edit-DokcerCompose (suppress errors when permissions don't allow)
Better aliases (eds and edc)
Better Git commands.
This commit is contained in:
lksz 2021-09-10 01:20:12 -04:00
parent 86fdee1acc
commit 33b4c5166b
7 changed files with 59 additions and 7 deletions

View file

@ -3,10 +3,11 @@
[string]$LocalPath,
[Parameter(Mandatory)]
[string]$GitOrigin,
[string]$Branch='HEAD'
[string]$Branch='HEAD',
[switch]$sudo
)
$local:gitPath = Join-Path 'themes' 'plextheme' | Get-Path
function doGit { git "--git-dir=`"$(Join-Path $LocalPath '.git')`"" "--work-tree=`"$LocalPath`"" $args }
function doGit { & $(if($sudo){"sudo"}) git "--git-dir=`"$(Join-Path $LocalPath '.git')`"" "--work-tree=`"$LocalPath`"" $args }
$local:savedErrorActionPreference = $ErrorActionPreference
$ErrorActionPreference = 'Stop'
$local:exists = Test-Path $LocalPath