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

Bolt Powershell Improvements #3325

Open
kruegerkyle95 opened this issue Jun 18, 2024 · 1 comment
Open

Bolt Powershell Improvements #3325

kruegerkyle95 opened this issue Jun 18, 2024 · 1 comment
Labels
Feature New features and improvements.

Comments

@kruegerkyle95
Copy link

Use Case

There are a few improvements that would be very convenient to have in the Bolt Powershell functions. When using Bolt on Windows, it's often nice to use the Powershell functions to invoke tasks/plans using the Invoke-BoltPlan/Invoke-BoltTask functions rather than calling Bolt via the bolt.bat file because we can then use native powershell objects for more complex input.

Currently, after Invoke-BoltInternal create a Ruby process, it doesn't read stdout until the process exits. This is different from running a task/plan via bolt.bat, where stdout is printed to the shell as things are written to that stream. The impact of this is that a long running, multi-step plan writes nothing to the shell until the very end of the plan. This is where we check whether or not the ruby process has exited, and don't check the stdout stream at all until it exits - https://github.com/puppetlabs/posh-bolt/blob/master/posh-bolt/Private/Invoke-BoltInternal.ps1#L62

Also, the text that is written to the shell when using the Powershell functions has no color like is does when calling bolt.bat. Everything is written in the default stdout color, whereas bolt.bat uses green, white, orange, and red text to indicate the type of message that is printed.

@kruegerkyle95 kruegerkyle95 added the Feature New features and improvements. label Jun 18, 2024
@holysoles
Copy link

It would be great to see these items get addressed, given the limitations of bolt.bat parsing input while in a PowerShell session, better support for these commands would make a meaningful difference in the usefulness of Bolt on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New features and improvements.
Projects
None yet
Development

No branches or pull requests

2 participants