Add: Install - git stash at update port to pwsh

This commit is contained in:
alstjr7375 2022-04-18 09:06:51 +09:00
parent 2c884f5ab5
commit ba16f7e1e0

View file

@ -735,9 +735,20 @@ function Update-Profile() {
$local:Path = $LEPTONINFO["${section}"]["Path"] $local:Path = $LEPTONINFO["${section}"]["Path"]
$local:LEPTONGITPATH="${Path}\chrome\.git" $local:LEPTONGITPATH="${Path}\chrome\.git"
if ( "${Type}" -eq "Git" ){ if ( "${Type}" -eq "Git" ) {
$local:gitDirty = $false
if ( "$(git diff --stat)" -ne '' ) {
$local:gitDirty = $true
git --git-dir "${LEPTONGITPATH}" checkout stash
}
git --git-dir "${LEPTONGITPATH}" checkout "${Branch}" git --git-dir "${LEPTONGITPATH}" checkout "${Branch}"
git --git-dir "${LEPTONGITPATH}" pull --no-edit git --git-dir "${LEPTONGITPATH}" pull --no-edit
if ( "${gitDirty}" -eq $true ) {
git --git-dir "${LEPTONGITPATH}" checkout stash pop
}
} }
elseif ( "${Type}" -eq "Local" -or "${Type}" -eq "Release" ) { elseif ( "${Type}" -eq "Local" -or "${Type}" -eq "Release" ) {
Check-ChromeExist Check-ChromeExist