-
Notifications
You must be signed in to change notification settings - Fork 237
Add command to get pertinent version info. #404
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
Conversation
Hmm, given that PSES is supposed to be cross editor perhaps having this command check VSCode version & extensions isn't the right way to go. Maybe this would be better as a VSCode command that copied version info to the clipboard? Might even put it on your status bar pick list. This approach would have the advantage of being able to copy to the clipboard on Linux and macOS. It would just need a way to get the PSVersionTable back from the PowerShell session hosting PSES (as well as OS info). Presumably we can get the VSCode version from within VSCode. |
I think your general approach is a good one, but we may be able to take it one step further:
It's all a lot of work, but would probably make issue filing much easier. For now we could just start with the editor-agnostic command in the PSES module. Probably need to think a little bit on the name, but we can go ahead and merge it while thinking about it. |
Sounds like a great plan to me. The Upload logs would be especially handy as in theory we could use PowerShell >= 5 to zip the logs and upload the zip. Not sure what to do about v3/v4. Perhaps use the COM Shell object to compress the files? Seems like there is a compress function in there somewhere. I'll tweak the command tonight to remove the Set-Clipboard and code commands. |
Yeah, using a COM object seems fine to me if it works on Win7 and up. I've been wanting to do this kind of automated issue posting thing for a while now. |
With the latest change, the following string is returned:
There are other I'm assuming the code to actually submit an issue will be in the VSCode extension. However it may be easier to ZIP the log directory from PowerShell. Should I add a command that takes the Log directory path and zip it using the appropriate method on the OS? I would likely put the ZIP file beside the original log dir. Thoughts? |
Overall, I don't like exposing such a "general purpose" command from the module. Maybe we have just one command called New-IssueReport that zips the folder and returns an object with the zipPath and version info?
I added a |
Yeah, |
If the idea is to invoke it from the editor which, I believe, is your plan. Then it doesn't have to be discoverable like a command. In fact, we don't want it to be discoverable in that case. So yeah, a script would work. I can rework this into a script. Any suggestions on a name? GetPsesVersionInfo.ps1? |
I'm gonna go ahead and merge this so that I can roll it into an internal command module for PSES. |
I'm not sure about the noun on this command. Open to suggestions. But if we take this then the VSCode-PowerShell issue template simplifies to having folks run the command from the IC and paste results into issue. Another option would be to have them open the logs and copy the version info from there.
Also, I don't have a Mac so the command to get OS version
lsb_release -d
needs to be tested and potentially replaced with the correct command.