-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent handling of $PWD #249
Comments
What drive location do we need: that of Powershell runspace, that of the module containing the rule, that of the script calling Invoke-PsRule ? |
@LaurentDardenne It doesn't happen in all cases, but I notice the issue when I was trying to load a file from disk within a rule. Yeah, the fix is to just set the variable inside the rule runspace to match the calling process. |
It is not this case ? |
@LaurentDardenne No not in this case. It seems to be related to how the process is run, possibly only affecting PowerShell Core. In this case it was defaulting |
Description of the issue
$PWD
is not always set as expected during PSRule execution.To Reproduce
Steps to reproduce the issue:
Expected behaviour
$PWD
should use the same path before and during PSRule execution.Module in use and version:
Captured output from
$PSVersionTable
:The text was updated successfully, but these errors were encountered: