GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Enable import-module to be case insensitive by SteveL-MSFT · Pull Request #5097 · PowerShell/PowerShell

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Oct 12, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Apparently macOS is case insensitive

Fix #1621

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

andyleejordan reacted with thumbs up emoji andyleejordan reacted with laugh emoji
All reactions
  • 👍 1 reaction
  • 😄 1 reaction
@SteveL-MSFT Steve Lee (SteveL-MSFT) assigned Aditya Patwardhan (adityapatwardhan) Oct 12, 2017
@SteveL-MSFT
Steve Lee (SteveL-MSFT) requested review from Andrew (anmenaga) and Chunqing Chen (chunqingchen) October 12, 2017 19:45
@SteveL-MSFT
Steve Lee (SteveL-MSFT) requested review from Bruce Payette (BrucePay), Dongbo Wang (daxian-dbw), Jason Shirk (lzybkr) and sergei (vors) as code owners October 12, 2017 19:45
@SteveL-MSFT
Steve Lee (SteveL-MSFT) force-pushed the import-module-casing branch from fe348b9 to 31926ea Compare October 13, 2017 00:03
iSazonov
Ilya (iSazonov) reviewed Oct 13, 2017
View reviewed changes
Comment thread src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs Outdated

@iSazonov Ilya (iSazonov) Oct 13, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is only for Linux maybe use "#if UNIX"?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 13, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's technically any filesystem that's case sensitive and technically (although unlikely), it seems you can make NTFS case sensitive. for practical cases, it's probably fine to #ifdef this and if a customer has an issue on Windows, we can revisit

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 13, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed and added comment

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
adityapatwardhan
Aditya Patwardhan (adityapatwardhan) requested changes Oct 13, 2017
View reviewed changes
Comment thread src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs Outdated

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Oct 13, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cyclomatic complexity of this function is pretty high. Can this be refactored into a smaller function?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 13, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could simplify it a bit if we can make the assumption that the psd1 or psm1 file always has the same casing as the folder name. It's not clear to me if that is a safe assumption or not. The current code is conservative in that you could have: "...\Modules\FOO\foo.psd1"

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 13, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll check with the PSGet folks

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 13, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

per PSGet, it is safe to assume the folder and file names have the same casing. So I'll simplify this code.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/powershell/Modules/Microsoft.PowerShell.Core/Import-Module.Tests.ps1 Outdated

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Oct 13, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please redirect to null.
New-Item -ItemType Directory -Path "$modulesPath/$modulePath" -Force > $null

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 13, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will add

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/powershell/Modules/Microsoft.PowerShell.Core/Import-Module.Tests.ps1 Outdated

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Oct 13, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe -Force to ensure you are not loading a cached version.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 13, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will add

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 13, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, as part of this test, I'm removing the module with a different casing, so I don't want to -force loading

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Oct 19, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/powershell/Modules/Microsoft.PowerShell.Core/Import-Module.Tests.ps1 Outdated

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Oct 13, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

> $null

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 13, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will add

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/powershell/Modules/Microsoft.PowerShell.Core/Import-Module.Tests.ps1 Outdated

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Oct 13, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

> $null

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 13, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will add

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@SteveL-MSFT

Steve Lee (SteveL-MSFT) commented Oct 13, 2017

Copy link
Copy Markdown
Member Author

Aditya Patwardhan (@adityapatwardhan) feedback addressed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

iSazonov
Ilya (iSazonov) reviewed Oct 13, 2017
View reviewed changes
Comment thread src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs Outdated

@iSazonov Ilya (iSazonov) Oct 13, 2017

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In line 294 the same cycle? Can we remove it and replace with the new one on all platforms?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 13, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need both as the first one will find an exact match and fall through to this if it doesn't find it. Also the above loop also handles a file path to the module which I think should be case sensitive since it's a literal file path. The lower code only handles the module name which we can treat as case insensitive. The code is similar, but I don't think it's worth combining which will make it more complex.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@iSazonov Ilya (iSazonov) Oct 14, 2017

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we should use different logic for module folder names and module file names?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 14, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If someone uses: Import-module /users/steve/dev/MyModule/MyModule.psd1 then that should be treated as a case-sensitive path. If they use Import-module mymodule, then that's case-insensitive as that's a module name and not a filepath.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@iSazonov Ilya (iSazonov) Oct 14, 2017

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I meant folder and file names not paths.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 14, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see an easy way to have a single loop between the two without incurring a cost of enumerating the folders for the purpose of case-insensitive comparison in the "normal" case where either the case matches or the filesystem is case-insensitive. If there's two modules "Foo" and "foo", and the user does import-module foo we want the first loop to match foo and not Foo as that is an exact match.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@iSazonov Ilya (iSazonov) Oct 14, 2017

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have the same problem in #4699 - can you review the idea to use here?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 14, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the tab completion case, I think you have to cover more cases as ab might match ABc, abc, or aBcdefg, etc... so creating a case-insenstive match pattern makes sense. In this case, we have a specific name (wildcard is not accepted) and just need a case-insensitive match if we haven't already matched the exact casing (which is preferred). And we don't need to return all matches, the first one wins.

If we want just the first match to win even if there is an exact match, it would be easy to merge the two loops. However, I think we want to get an exact match if it exists, then fallback on case-sensitive search. For example, if the user typed ipmo AAA which exists in the last modulepath, but aaa exists in the first, I would have to enumerate all module folder names in every modulepath part every time just to make sure AAA wasn't found after my first case-insensitive match.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@iSazonov Ilya (iSazonov) Oct 15, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could have solved this situation on the other hand. Do we want all the modules to be portable? If so, we must document this and exclude the case-sensitivity in this code.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 15, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point on portable scripts being able to rely on module names being case insensitive. It would make sense to just say module names are case insensitive everywhere and have it enforced by install-module and publish-module.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

iSazonov reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
iSazonov
Ilya (iSazonov) reviewed Oct 16, 2017
View reviewed changes
Comment thread src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs Outdated

@iSazonov Ilya (iSazonov) Oct 16, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we could exclude #if here and leave one line.
Or maybe create helper functions - It will be easier to read and understand.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 16, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line isn't needed as I have qualifiedPath = folder above, was probably thinking this, but didn't put it together. Will fix.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@SteveL-MSFT
Steve Lee (SteveL-MSFT) force-pushed the import-module-casing branch 2 times, most recently from d00ab71 to 43e45cf Compare October 16, 2017 18:24
@iSazonov

Ilya (iSazonov) commented Oct 17, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Should we add negative tests too (to reflect the situations we have decided to exclude)? What errors should appear (throw)?
Also why we skip Windows in new test? If we want to have all modules portable all test should run on all platforms identically.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@SteveL-MSFT

Steve Lee (SteveL-MSFT) commented Oct 17, 2017

Copy link
Copy Markdown
Member Author

Ilya (@iSazonov) test was originally skipped due to the previous code for an exact match since it wasn't possible to create two modules that differ only by casing on Windows. With the new change, no reason not to run it on Windows. I also noticed a bug in the test where I wasn't removing the test module between runs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iSazonov

Ilya (iSazonov) commented Oct 17, 2017

Copy link
Copy Markdown
Collaborator

I don't see still that tests reflect to "StringComparison.OrdinalIgnoreCase".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@SteveL-MSFT

Steve Lee (SteveL-MSFT) commented Oct 17, 2017

Copy link
Copy Markdown
Member Author

Ilya (@iSazonov) the new test creates a module called TESTMODULE and imports it using testMODULE, this is where the case-insensitive comparison occurs. In the UNIX code path, if it enumerates the module folders in the module path and sees if it matches the name of the given module. Not clear to me if you were expecting a different test?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iSazonov

Ilya (iSazonov) commented Oct 17, 2017 via email

Copy link
Copy Markdown
Collaborator
@SteveL-MSFT My thoughts was that we should do `Import-Module testMODULE` and `Import-Module TESTMODULE` and check that we load the same module. Although I'm not sure it's necessary.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@SteveL-MSFT

Steve Lee (SteveL-MSFT) commented Oct 17, 2017

Copy link
Copy Markdown
Member Author

Ilya (@iSazonov) I don't think that's necessary

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Steve Lee (SteveL-MSFT) added 5 commits October 17, 2017 14:15
@SteveL-MSFT
enable import-module to be case insensitive
247b0db
@SteveL-MSFT
address PR feedback
6077272
simplify search loops with assumption that module file casing matches module folder name which
is appropriate per PSGet
@SteveL-MSFT
[feature]
fac1155
combine loops
@SteveL-MSFT
[feature]
b4f7c01
removed test that is no longer valid
@SteveL-MSFT
[feature]
fd7dcfb
enable test for Windows, removed invalid test where a module with version folder requires a manifest
@SteveL-MSFT
Steve Lee (SteveL-MSFT) force-pushed the import-module-casing branch from cefbc40 to fd7dcfb Compare October 17, 2017 21:32
iSazonov
Ilya (iSazonov) approved these changes Oct 18, 2017
View reviewed changes
adityapatwardhan
Aditya Patwardhan (adityapatwardhan) approved these changes Oct 18, 2017
View reviewed changes

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
adityapatwardhan
Aditya Patwardhan (adityapatwardhan) requested changes Oct 19, 2017
View reviewed changes
Comment thread src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs Outdated
{
qualifiedPath = Path.Combine(qualifiedPath, fileBaseName);
}
else if (Directory.Exists(qualifiedPath))

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Oct 19, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Utils.NativeDirectoryExists()
https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/engine/Utils.cs#L912

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 19, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will change

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs

if (!found)
#if UNIX
foreach (string folder in Directory.EnumerateDirectories(path))

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Oct 19, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Utils.NativeEnumerateDirectory()
https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/engine/Utils.cs#L926

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 19, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will change

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 19, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method appears to be only implemented for Win32. Since this path is only for UNIX, I'll leave it as-is.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Oct 19, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/powershell/Modules/Microsoft.PowerShell.Core/Import-Module.Tests.ps1 Outdated

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Oct 19, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@SteveL-MSFT
[feature]
169e597
changed to using Utils.NativeDirectoryExists() for perf reasons
adityapatwardhan
Aditya Patwardhan (adityapatwardhan) approved these changes Oct 19, 2017
View reviewed changes
@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) merged commit e908b8a into PowerShell:master Oct 19, 2017
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the import-module-casing branch November 12, 2017 05:17
@4ndri 4ndri (4ndri) mentioned this pull request May 14, 2022
Import-Module not working if psd1 and module folder has different casing (on unix) #17342
Closed
5 tasks done
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@SteveL-MSFT @adityapatwardhan
Enable import-module to be case insensitive (PowerShell#5097)
d970d56
Fix PowerShell#1621 

Enable import-module to be case insensitive as macOS is case insensitive.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) adityapatwardhan approved these changes
@iSazonov Ilya (iSazonov) iSazonov approved these changes
@anmenaga Andrew (anmenaga) Awaiting requested review from anmenaga
@chunqingchen Chunqing Chen (chunqingchen) Awaiting requested review from chunqingchen
@BrucePay Bruce Payette (BrucePay) Awaiting requested review from BrucePay
@daxian-dbw Dongbo Wang (daxian-dbw) Awaiting requested review from daxian-dbw
@lzybkr Jason Shirk (lzybkr) Awaiting requested review from lzybkr
@vors sergei (vors) Awaiting requested review from vors

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@adityapatwardhan Aditya Patwardhan (adityapatwardhan)

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@SteveL-MSFT @iSazonov @adityapatwardhan
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.