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

Throw exception on a simple use-case #2

Open
vors opened this issue Dec 8, 2014 · 0 comments
Open

Throw exception on a simple use-case #2

vors opened this issue Dec 8, 2014 · 0 comments

Comments

@vors
Copy link

vors commented Dec 8, 2014

I created file with content

function Download-File($url, $file) {
    $webclient = New-Object System.Net.WebClient
    $webclient.DownloadFile($url,$file)
}

Run Document cmdlet and get this error message

image

Message text:

---------------------------
Sublime Text
---------------------------
get-command : The term 'Download-File' is not recognized as the name of a 
cmdlet, function, script file, or operable program. Check the spelling of the 
name, or if a path was included, verify that the path is correct and try again.
At C:\Users\sevoroby\AppData\Roaming\Sublime Text 3\Packages\Powershell Help 
Generator\Get-HelpTemplate.ps1:5 char:6
+ $c = get-command $commandName
+      ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Download-File:String) [Get-Comm 
   and], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Co 
   mmands.GetCommandCommand

Cannot index into a null array.
At C:\Users\sevoroby\AppData\Roaming\Sublime Text 3\Packages\Powershell Help 
Generator\Get-HelpTemplate.ps1:24 char:5
+     $parameter = $c.Parameters[$_]
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

Cannot index into a null array.
At C:\Users\sevoroby\AppData\Roaming\Sublime Text 3\Packages\Powershell Help 
Generator\Get-HelpTemplate.ps1:25 char:5
+     $parameters += $c.Parameters[$_]
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray


---------------------------
OK   
---------------------------
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

No branches or pull requests

1 participant