Skip to content

Parameter completion should work even when #requires fails #4549

@lzybkr

Description

@lzybkr

Steps to reproduce

In a non-elevated PowerShell, try to tab complete parameters to a script that looks like:

#requires -RunAsAdministrator
param($ABC)

Expected behavior

Completion works. Note that the current behavior is slightly useful as an indicator that the script won't run even after finishing the command line, but it is poor behavior in an editor that probably isn't running elevated.

Actual behavior

Completion fails silently

Environment data

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.0.0-beta
PSEdition                      Core
GitCommitId                    v6.0.0-beta.5
OS                             Microsoft Windows 10.0.16262
Platform                       Win32NT

Metadata

Metadata

Assignees

No one assigned

    Labels

    In-PRIndicates that a PR is out for the issueResolution-No ActivityIssue has had no activity for 6 months or moreUsability(LEGACY) Helps filter issues that might be higher priority because they directly affect usabilityWG-Interactive-IntelliSensetab completion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions