-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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 functionalityResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
Description
PowerShell Core is moving to .NET Core 2.0 with PR #3556. Once that PR is merged, we need to review all if/def and Unix specific code to:
- Clean up the code
- Make sure the code make sense and is not a temporary hack
An Example (Please remove when fixed)
Platform.InternalGetFolderPath in src/System.Management.Automation/CoreCLR/CorePsPlatform.cs has the following code:
case System.Environment.SpecialFolder.ProgramFiles:
folderPath = "/bin";
if (!System.IO.Directory.Exists(folderPath)) { folderPath = null; }
break;
case System.Environment.SpecialFolder.ProgramFilesX86:
folderPath = "/usr/bin";
if (!System.IO.Directory.Exists(folderPath)) { folderPath = null; }
break;
case System.Environment.SpecialFolder.System:
case System.Environment.SpecialFolder.SystemX86:
folderPath = "/sbin";
if (!System.IO.Directory.Exists(folderPath)) { folderPath = null; }
break;
It use /bin for ProgramFiles, /usr/bin for ProgramFilesX86 and /sbin for System and SystemX86. It's not clear if this is appropriate, so code like this should be reviewed.
andyleejordan
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 functionalityResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime