Skip to content

Format-ScriptFormatCodeIndentation doesn't work after building #5

@vlariono

Description

@vlariono

Format-ScriptFormatCodeIndentation stops working after release building. It's related to the following code:

$AST = [System.Management.Automation.Language.Parser]::ParseInput($ScriptText, [ref]$Tokens, [ref]$ParseError) 

It will be change after build process is run:

$AST = [System.Management.Automation.Language.Parser]::ParseInput($ScriptText, [System.Management.Automation.PSReference]$Tokens, [System.Management.Automation.PSReference]$ParseError)

It seems types are expanded incorrectly because $Tokens variable will always be empty. If I change it back to [ref] everything works again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions