-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Remove NormalizeFilePath() method from CommandLineParameterParser.cs #7469
Copy link
Copy link
Closed
Labels
Issue-Code Cleanupthe issue is for cleaning up the code with no impact on functionalitythe issue is for cleaning up the code with no impact on functionality
Description
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()
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Issue-Code Cleanupthe issue is for cleaning up the code with no impact on functionalitythe issue is for cleaning up the code with no impact on functionality