mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 20:56:02 +00:00
Add simple test for non-empty workflow, make it work
This commit is contained in:
1 parent
9eda67b00c
commit
c4f268f7cd
2 files changed
+8
-2
No files matched your search
+6
-1
@@ -3956,7 +3956,12 @@ namespace Microsoft.PowerShell.Activities
|
||||
{
|
||||
try
|
||||
{
|
||||
runspace.SessionStateProxy.PSVariable.Set(name, value);
|
||||
var psvar = runspace.SessionStateProxy.PSVariable.Get(name);
|
||||
if (psvar == null || (psvar.Options & ScopedItemOptions.ReadOnly) == 0)
|
||||
{
|
||||
// don't try to overwrite read-only variables values
|
||||
runspace.SessionStateProxy.PSVariable.Set(name, value);
|
||||
}
|
||||
}
|
||||
catch (PSNotSupportedException)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user