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

PowerJS fails to start if the PowerShell profile takes too long to load #12

Open
IsaacUtah1379 opened this issue Jan 1, 2025 · 0 comments · May be fixed by #13
Open

PowerJS fails to start if the PowerShell profile takes too long to load #12

IsaacUtah1379 opened this issue Jan 1, 2025 · 0 comments · May be fixed by #13

Comments

@IsaacUtah1379
Copy link

As a built-in feature of PowerShell, a message is logged stating how long it to load the PowerShell profiles whenever that time is greater than 500 ms. Unfortunately, this message is written to PowerShell's Error stream, which in turn feeds into the stderr of the process spawned by child_process.spawn. Because stderr is checked when constructing an instance of PowerJS and must empty for this to succeed, it is impossible to create an instance of PowerJS if loading the PowerShell profiles takes longer than 500 ms. For use cases where the profiles are not needed, it would be best to just not load the profiles at all, as mentioned in #8. However, there may be instances where it would be helpful to still load the profile. In these cases, it would be necessary for the message stating profile load times to be ignored when constructing an instance of PowerJS.

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

Successfully merging a pull request may close this issue.

1 participant