Open zhaolinlau opened 4 months ago
Thanks a ton for reporting this!
There's a few things I want to go ahead and clarify on whats going on here:
1) Did you need to run Pulsar as Admin? This should no longer be required to add Pulsar to the PATH no matter if you have a per-user or system install. But if that was giving you any errors that'd be awesome to know.
2) Would you mind checking the current ExecutionPolicy of your system? Just running Get-ExecutionPolicy
in any PowerShell terminal should return this information to you.
Also you mentioned having to add PowerShell to the PATH on Windows, I was under the assumption it should always be in the PATH just like cmd or other internal Windows essentials. Is this something you had removed? Or is this a work device that is significantly locked down?
To clarify on expected behavior with the reworked PATH adding of Pulsar v1.116.0 it should look like:
Add Pulsar to PATH
(Just adding the above to make sure everyone's on the same page)
FWIW, if I do Set-ExecutionPolicy -Scope CurrentUser Default
(which sets the policy to Restricted, see https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.4)...
Then it gives me an error that the script cannot be run.
If I do Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
, then it works as intended (with the usual requirement of restarting before it takes effect for cmd.exes or other terminals one might open).
(I must have had it on RemoteSigned
during testing for the updated/simplified "Add Pulsar to PATH" checkbox. I believe it is quite popular (for people who actually intend to run powershell .ps1
scripts on their non-server Windows machines) to set RemoteSigned
Execution Policy.)
@DeeDeeG Well I'll be. Seems mine is also on RemoteSigned
likely due to previous work I've done, without realizing I had it changed during development of this feature.
Seems strange that it would suddenly break now, when we were able to run a PowerShell script just fine before.
But regardless with this now being an issue, I wonder what our best way of resolving it is. Since we don't sign Pulsar on Windows at all due to cost
If it's possible to re-write in cmd.exe
or "do it in JS", that might be the best thing? Since I don't think batch/cmd scripts are locked down in quite the same way? (And we're definitely allowed to run JS if we've gotten this far, heh.)
@DeeDeeG While technically we could do it in cmd
we would then be relegated to the setx
command only, which I know we've previously discussed the downsides.
I wonder if we could maybe do:
Thanks in advance for your bug report!
What happened?
When I check the
Add Pulsar to PATH
, it pops up errors as below:Pulsar version
1.116.0
Which OS does this happen on?
🪟 Windows
OS details
11
Which CPU architecture are you running this on?
x86_64/AMD64
What steps are needed to reproduce this?
Add Pulsar to PATH
Additional Information:
No response