forked from p15670423/monkey
Modify Windows deployment script to check $env:SKIP before adding swimm-verify to it
This commit is contained in:
parent
05dd10cd96
commit
9383457518
|
@ -25,7 +25,15 @@ function Configure-precommit([String] $git_repo_dir)
|
|||
Pop-Location
|
||||
|
||||
# Set env variable to skip Swimm verification during pre-commit, Windows not supported yet
|
||||
[System.Environment]::SetEnvironmentVariable('SKIP','swimm-verify',[System.EnvironmentVariableTarget]::User)
|
||||
$skipValue = [System.Environment]::GetEnvironmentVariable('SKIP', [System.EnvironmentVariableTarget]::User)
|
||||
if ($skipValue) { # if `SKIP` is not empty
|
||||
if (-Not ($skipValue -split ',' -contains 'swimm-verify')) { # if `SKIP` doesn't already have "swimm-verify"
|
||||
[System.Environment]::SetEnvironmentVariable('SKIP', $env:SKIP + ',swimm-verify', [System.EnvironmentVariableTarget]::User)
|
||||
}
|
||||
}
|
||||
else {
|
||||
[System.Environment]::SetEnvironmentVariable('SKIP', 'swimm-verify', [System.EnvironmentVariableTarget]::User)
|
||||
}
|
||||
|
||||
Write-Output "Pre-commit successfully installed"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue