Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.17.1 contains no ExportedCommands #1042

Closed
jakerobinson opened this issue Jul 19, 2018 · 3 comments · Fixed by #1049
Closed

1.17.1 contains no ExportedCommands #1042

jakerobinson opened this issue Jul 19, 2018 · 3 comments · Fixed by #1049

Comments

@jakerobinson
Copy link

jakerobinson commented Jul 19, 2018

Before submitting a bug report:

  • Make sure you are able to repro it on the latest released version
  • Perform a quick search for existing issues to check if this bug has already been reported

Steps to reproduce

Install-Module PSScriptAnalyzer
Get-Command -Module PSScriptAnalyzer

Expected behavior

CommandType     Name                                               Version
-----------     ----                                               -------
Cmdlet          Get-ScriptAnalyzerRule                             1.16.1 
Cmdlet          Invoke-Formatter                                   1.16.1 
Cmdlet          Invoke-ScriptAnalyzer                              1.16.1

Actual behavior

Returns nothing.

If an unexpected error was thrown then please report the full error details using e.g. $error[0] | Select-Object *

Environment data

> $PSVersionTable
Name                           Value                                       
----                           -----                                      
PSVersion                      6.0.1                                      
PSEdition                      Core                                       
GitCommitId                    v6.0.1                                     
OS                             Darwin 16.7.0 Darwin Kernel Version 16.7...
Platform                       Unix                                       
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                    
PSRemotingProtocolVersion      2.3                                        
SerializationVersion           1.1.0.1                                    
WSManStackVersion              3.0

> (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() }
1.17.1
@bergmeister
Copy link
Collaborator

bergmeister commented Jul 19, 2018

@jakerobinson For PowerShell Core, the minimum supported version is 6.0.2, you need to update your version.
This is documented on the Release page here but we should also document it in the main Readme (and we should throw a specific error in the next version of PSSA). The reason for requiring at least 6.0.2 is a bug in the NuGet packages of the reference asemblies for SMA in PS 6.0.0 and 6.0.1

@jakerobinson
Copy link
Author

Ouch. Any way we can specify a powershell version requirement for this module?

@bergmeister
Copy link
Collaborator

bergmeister commented Jul 19, 2018

The psd1 specifies a minimum of 3.0 because we also support Windows PowerShell, therefore we cannot use that field. But the idea would be to add custom code in the psm1 file for throwing a custom error. As an aside: PS 6.1 will get released in 1 month, therefore 6.0 is only half a year away from being deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants