We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8134536 commit 2cf815eCopy full SHA for 2cf815e
scripts/load-env.ps1
@@ -1,8 +1,18 @@
1
+param (
2
+ [switch]$Verbose
3
+)
4
+
5
Get-Content "$PSScriptRoot\..\.env" | ForEach-Object {
6
if ($_ -match '^(.*?)=(.*)$') {
7
$key = $matches[1].Trim()
8
$value = $matches[2].Trim()
- Write-Host "Setting environment variable: $key=$value" -ForegroundColor Green
9
10
+ if ($Verbose) {
11
+ Write-Host "Setting environment variable: $Key=$value" -ForegroundColor Green
12
+ }
13
+ else {
14
+ Write-Host "Setting environment variable: $Key=********" -ForegroundColor Green
15
16
Set-Item "env:$key" $value
17
}
18
0 commit comments