19 lines
297 B
PowerShell
19 lines
297 B
PowerShell
|
|
||
|
# make sure the file exists
|
||
|
$file = $env:ENV_SHARE_FILE
|
||
|
if -not (Test-Path $file) {
|
||
|
exit
|
||
|
}
|
||
|
|
||
|
# insert values into env
|
||
|
foreach($line in Get-Content $file) {
|
||
|
$parts = $line -split ' = '
|
||
|
$var = $parts[0]
|
||
|
$value = $parts[1]
|
||
|
Set-Item env:$var -Value $value
|
||
|
}
|
||
|
|
||
|
# delete the file
|
||
|
Remove-Item $file
|
||
|
|