Skip to content

Instantly share code, notes, and snippets.

View 7sDream's full-sized avatar
😪
I'm not sleepy!

7sDream 7sDream

😪
I'm not sleepy!
View GitHub Profile
@7sDream
7sDream / with-env.ps1
Last active January 9, 2023 23:44 — forked from kizzx2/with-env.ps1
Run command with environment variables in PowerShell
function With-Env {
$ori = @{}
Try {
$i = 0
# Loading .env files
# if (Test-Path $args[0]) {
# foreach ($line in (Get-Content $args[0])) {
# if ($line -Match '^\s*$' -Or $line -Match '^#') {
# continue