Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Conversation

@cdonnellytx
Copy link
Contributor

I downloaded and installed PSSwagger 0.3.0 from PSGallery and got the following (non-fatal) error trying to generate a new module:

The variable '$ModuleVersion' cannot be retrieved because it has not been set. At C:\Users\xxx\Documents\WindowsPowerShell\Modules\PSSwagger\0.3.0\PSSwagger.psm1:468 char:76 + ... irectory = Join-Path -Path $outputDirectory -ChildPath $ModuleVersion + ~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (ModuleVersion:String) [], RuntimeException + FullyQualifiedErrorId : VariableIsUndefined The variable '$ModuleVersion' cannot be retrieved because it has not been set. At C:\Users\xxx\Documents\WindowsPowerShell\Modules\PSSwagger\0.3.0\PSSwagger.psm1:469 char:66 + ... $SymbolPath = Join-Path -Path $SymbolPath -ChildPath $ModuleVersion + ~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (ModuleVersion:String) [], RuntimeException + FullyQualifiedErrorId : VariableIsUndefined 

I tracked down the error to those lines, which referenced a nonexistent $ModuleVersion variable. I changed the references to $Version, which appears to create the directories properly. I then forked the repo and made the fixes here on this branch.

Please do not hesitate to contact me if you have any questions or concerns, or if you need me to make additional changes and fixes before this PR can be accepted.

Thanks,
# Chris

Copy link
Contributor

@bmanikm bmanikm left a comment

Choose a reason for hiding this comment

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

:shipit:

@bmanikm bmanikm merged commit ca98c0d into PowerShell:developer Jan 24, 2018
@cdonnellytx cdonnellytx deleted the fix-version-warning branch March 1, 2018 00:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants