This file contains hidden or 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
# Example: env TEST=1 cmd /c 'echo TEST=%TEST%' | |
function Invoke-WithEnvironment { | |
# parse arguments | |
$NewEnv = @{} | |
$CommandArgs = @() | |
$ParsingEnv = $true | |
foreach ($Arg in $Args) { | |
if ($ParsingEnv) { | |
# FIXME: is this pattern ok? |
This file contains hidden or 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
<?php | |
echo "test"; | |
?> |