Skip to content

Fix PowerShell module installation path on Windows#14

Open
nachomata wants to merge 1 commit intonokia:mainfrom
nachomata:fix/powershell-completion-path
Open

Fix PowerShell module installation path on Windows#14
nachomata wants to merge 1 commit intonokia:mainfrom
nachomata:fix/powershell-completion-path

Conversation

@nachomata
Copy link
Copy Markdown
Contributor

The Windows MSI installer for version 32.1.1 was placing the file corteca.ps1 in $HOME\Documents\PowerShell\Modules.
However when trying to import the module to enable autocompletion functionality, PowerShell throws the following error:

Import-Module -Name corteca
Import-Module: The specified module 'corteca' was not loaded because no valid module file was found in any module directory.

This PR fixes the issue by:

  • Moving the file to a subfolder named Corteca (as required for PowerShell modules)
  • Renaming the file from .ps1 to .psm1 so that it is recognized as a valid module.

After this change, running Import-Module -Name Corteca works as expected and enables autocompletions.

Could be interesting to considering adding Import-Module -Name Corteca to $PROFILE when corteca is installed or create a module manifest to enable auto-import.

Let me know if there’s anything you’d like to adjust. Thanks! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant