Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

CommandInvocationIntrinsics.InvokeScript bind arguments to $input instead of $args #4923

Copy link
Copy link
@PetSerAl

Description

@PetSerAl
Issue body actions

This lines:

public Collection<PSObject> InvokeScript(string script, params object[] args)
{
    return InvokeScript(script, true, PipelineResultTypes.None, args);
}

Pass args parameter into input parameter of called function, thus mixing them up.

Steps to reproduce

$ExecutionContext.SessionState.InvokeCommand.InvokeScript('"`$args:($args); `$input:($input)"', 1, 2, 3)

Expected behavior

$args:(1 2 3); $input:()

Actual behavior

$args:(); $input:(1 2 3)

Environment data

Tested in v2.0 and v5.1.15063.608

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Breaking-Changebreaking change that may affect usersbreaking change that may affect usersIssue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.The issue is fixed.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.