Skip to content

Remove NormalizeFilePath() method from CommandLineParameterParser.cs #7469

Description

@iSazonov

We could remove NormalizeFilePath() method from CommandLineParameterParser.cs and exclude extra try-catch
to address comment https://github.com/PowerShell/PowerShell/pull/7449/files/777f5eb1e2ee65201356a2f499586dc7c6039422#r207770391

The method is used once and then we call File.Exist() where Path.GetFullPath() is called again.
https://source.dot.net/#System.IO.FileSystem/System/IO/File.cs,119
We could simplify the TryParseSettingFileHelper() method - remove try-catch there (line 429), move the line 574 to TryParseSettingFileHelper() before File.Exist()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Code Cleanupthe issue is for cleaning up the code with no impact on functionality

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions