plugins
plugins copied to clipboard
psscriptanalyzer hanging
I'm on latest version of trunk 1.22.2 and plugins were just updated v1.6.1.
I love that there is a psscriptanalyzer option, but this is the second time I've tried to use and both had timeouts.
Never seems to return and just hangs.
config that seems relevant. Any idea what might be causing this?
version: '0.1'
cli:
version: 1.22.2
shell_hooks:
path_add:
- '${workspace}/tools'
plugins:
sources:
- id: trunk
ref: v1.6.1
uri: https://github.com/trunk-io/plugins
lint:
enabled:
- [email protected]
tools:
enabled:
- [email protected]
- [email protected]
This also applied when I tried to run trunk fmt first, and it kept hanging.
Hi! Sorry that you're running into this. We are investigating a similar issue with trufflehog, but we don't yet have a fix. In the meantime, you should be able to trunk daemon shutdown and then rerun and be up and running again. We will keep investigating to identify the root cause. If this doesn't fix your problem, please let us know
⬆️ bump. Any knowledge on why this is failing? I'd like to have powershell scripts linted and formatted as part of the stack but need to ensure it's fast and not hanging.
Sorry, it seems to be a different issue from trufflehog, which has to do with a batching bug. We will keep looking into this, but last I checked it is an issue with psscriptanalyzer spawning child processes and disconnecting from them, which is why we can't currently support it on Mac. It's a race condition related to their execution flow, but we don't have a clean way to wrap it on our end yet.
Ok, this is useful to know. How about a custom action, would just invoking it myself make any difference in the way you are executing if I install it as a tool?
Not that I know of. Also, CLI version 1.22.6 was just released which fixes the trufflehog hanging bug. If you could give that a try if you have a reliable repro for the psscriptanalyzer hanging, please let us know.
Opened this issue up as I notice that the manual invocation of formatter fails regardless of in trunk or not. Sounds related based on your mention.
https://github.com/PowerShell/PSScriptAnalyzer/issues/2031