You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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:
An Example (Please remove when fixed)
Platform.InternalGetFolderPathinsrc/System.Management.Automation/CoreCLR/CorePsPlatform.cshas the following code:It use
/binforProgramFiles,/usr/binforProgramFilesX86and/sbinforSystemandSystemX86. It's not clear if this is appropriate, so code like this should be reviewed.