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
{{ message }}
Repository navigation
Remove-Module doesn't care about casing, but Import-Module does care #3573
Is it a good idea to allow case-sensitive module names considering that Windows will not support such module names as its file system is case-insensitive? Seems like PowerShell should treat modules as case-insensitive. I don't see any value in allowing posh-git, Posh-Git and Posh-GIT to be different modules. I think that would just lead to confusion. IMO all of the module-related commands should be case-insensitive. And if on Linux someone has both mymodule and MyModule dirs. and is trying to import Mymodule, PowerShell should warn the user about the conflict.
I don't think so. Script filename casing should following the OS's casing rules. That said, the PowerShell Gallery should consider warning (or rejecting) when publishing scripts that would stomp a different script with the same name on a case-insensitive file system. Either that or use some other means of disambiguation (author name, pub-date, version, etc).
Loading a module by path doesn't have to follow the same rules as loading a module by name. Considering module "names" are backed by file system names, I'll admit this gets messy. But given that command names in PowerShell are case-insensitive, it seems like the right way to go.
Activity
iSazonov commentedon Apr 16, 2017
Aleksandar Nikolić (@alexandair) Thanks for your report!
I believe if on Unix we allow import different modules
modulenameandModulenamewe should be case-sensitive inRemove-ModuleandGet-Moduletoo?rkeithhill commentedon Apr 16, 2017
Is it a good idea to allow case-sensitive module names considering that Windows will not support such module names as its file system is case-insensitive? Seems like PowerShell should treat modules as case-insensitive. I don't see any value in allowing posh-git, Posh-Git and Posh-GIT to be different modules. I think that would just lead to confusion. IMO all of the module-related commands should be case-insensitive. And if on Linux someone has both mymodule and MyModule dirs. and is trying to import Mymodule, PowerShell should warn the user about the conflict.
iSazonov commentedon Apr 17, 2017
If we consider the module names as case-insensitive, then should we do the same in relation to the names of scripts and other PowerShell files?
rkeithhill commentedon Apr 17, 2017
I don't think so. Script filename casing should following the OS's casing rules. That said, the PowerShell Gallery should consider warning (or rejecting) when publishing scripts that would stomp a different script with the same name on a case-insensitive file system. Either that or use some other means of disambiguation (author name, pub-date, version, etc).
iSazonov commentedon Apr 17, 2017
I expect that this will amaze users that .psm1 is case-insensitive and .ps1 case-sensitive.
rkeithhill commentedon Apr 17, 2017
Loading a module by path doesn't have to follow the same rules as loading a module by name. Considering module "names" are backed by file system names, I'll admit this gets messy. But given that command names in PowerShell are case-insensitive, it seems like the right way to go.
joeyaiello commentedon Apr 17, 2017
I believe this is an application of the question raised in #706. Ideally, we should address this all up.
SteveL-MSFT commentedon Oct 12, 2017
Dupe of #1621
fix(probes): use System.Diagnostics.Process for F2 abort exit code
fix(probes): assert F2 abort exit code exactly 1 (#223)