Created
February 3, 2017 15:57
-
-
Save Xainey/a8793a62dcb6d613bf0482ee6deec36f to your computer and use it in GitHub Desktop.
Powershell export command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function export | |
{ | |
try | |
{ | |
$s = ($args[0]).Split("=", 2) | |
if($s.Count -ne 2) | |
{ | |
throw "more finesse please." | |
} | |
New-Item -Name $s[0] -Value $s[1] -ItemType Variable -Path Env: -Force | Out-Null | |
} | |
catch [Exception] | |
{ | |
"Whoops, " + $_ | |
} | |
} | |
export FLASK_APP=example |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment