Skip to content
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

PowerShell tasks applies wrong argument order in Nuke v9 #1508

Closed
Baune8D opened this issue Jan 24, 2025 · 0 comments
Closed

PowerShell tasks applies wrong argument order in Nuke v9 #1508

Baune8D opened this issue Jan 24, 2025 · 0 comments
Labels
Milestone

Comments

@Baune8D
Copy link

Baune8D commented Jan 24, 2025

Usage Information

NUKE 9.0.4 / .NET 8.0.11 / net8.0 / macOS 15.2

Description

Execute the following target using any v9 version of Nuke:

Target Test => _ => _
    .Executes(() =>
    {
        Pwsh(s => s
            .SetFile("LookAtMe.ps1")
            .EnableNoProfile()
            .EnableNonInteractive());
    });

Nuke generates the following command: /usr/local/bin/pwsh -File LookAtMe.ps1 -NoProfile -NonInteractive

Here -NoProfile and -NonInteractive are sent as arguments to the LookAtMe.ps1 script instead of the pwsh process.

Using the same target with Nuke 8.1.4 generates this: /usr/local/bin/pwsh -NoProfile -NonInteractive -File LookAtMe.ps1

Reproduction Steps

Execute target from description and observe generated command.

Expected Behavior

NoProfile and NonInteractive should be applied before the -File argument.

Actual Behavior

NoProfile and NonInteractive are applied to the -File script as arguments.

Regression?

This was working properly in Nuke 8.1.4

Known Workarounds

None

Could you help with a pull-request?

No

@Baune8D Baune8D added the bug label Jan 24, 2025
@matkoch matkoch closed this as completed Jan 24, 2025
@matkoch matkoch added this to the v9.0.5 milestone Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants