Allow output of native OS binaries to be captured from CLI and task runners

Description

None

Gliffy Diagrams

Activity

Show:

John Farrar April 3, 2018 at 10:57 PM

Sweet! Great direction for commandbox.

Brad Wood April 3, 2018 at 7:45 PM

The run command tries very hard to be smart now. This is really a work around until I get a chance to deal with piped input streams between commands. Basically, if you do a simple binary execution, it will be interactive which doesn't capture the output but lets you capture keyboard input.

However, if you:

  • Pipe the run command into another command

  • Execute the run command as part of an expression (backtick expansion)

  • Execute the command as part of the CommandDSL with returnOutput=true
    Then, the output of the native binary execution will not be streamed directly to the terminal but will be returned as a string which can be captured. This means that you can't run anything interactive if you plan on capturing the output. For example, this would hang forever:

    Well, that's technically not true. The keyboard is still bound to the input, so technically you could still type "exit" and hit enter and it would work, but you'd be doing it blind!

Brad Wood March 9, 2018 at 6:40 PM

Sure, I guess. It's the same behavior you've been asking about for a while. I've been meaning to address it in CommandBox 4 but didn't have a ticket for it. It's really any external binary called by ProcessBuilder. So, if that's powershell, which in turn is calling some other binary, then sure.

John Farrar March 9, 2018 at 12:44 PM

When we say native OS, would this include PowerShell?

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Assignee

Reporter

Fix versions

Priority

Components

Created March 9, 2018 at 6:40 AM
Updated April 3, 2018 at 10:57 PM
Resolved April 3, 2018 at 7:39 PM