Skip to content

Add getExecOutput function#814

Merged
luketomlinson merged 7 commits intomainfrom
add-exec-output
May 21, 2021
Merged

Add getExecOutput function#814
luketomlinson merged 7 commits intomainfrom
add-exec-output

Conversation

@luketomlinson
Copy link
Copy Markdown
Contributor

Adds a convenience function go more easily get the output of an exec command. Rather than having to explicitly define listeners in ExecOptions this method will return the collected output of stdOut and stdErr in addition to the exit code. This should make usage a little less awkward in situations where users need the output of an exec command.

Resolves #769

@luketomlinson luketomlinson requested a review from a team as a code owner May 20, 2021 16:04
Comment thread packages/exec/src/exec.ts
Comment thread packages/exec/__tests__/scripts/stdoutoutputlarge.js
Comment thread packages/io/src/io.ts
thboop
thboop previously approved these changes May 20, 2021
Copy link
Copy Markdown
Collaborator

@thboop thboop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM minor thoughts

Copy link
Copy Markdown
Collaborator

@thboop thboop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests appear to be failing

@thboop thboop dismissed their stale review May 20, 2021 19:26

Failing tests

Copy link
Copy Markdown
Collaborator

@thboop thboop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luketomlinson luketomlinson merged commit ddd04b6 into main May 21, 2021
@luketomlinson luketomlinson deleted the add-exec-output branch May 21, 2021 16:12
@t1m0thyj
Copy link
Copy Markdown

t1m0thyj commented Jun 4, 2021

The functionality introduced in this PR is very useful. For now I've copied the getExecOutput function into my GH action. Any idea when an update to @actions/exec will be published that includes this change? Thanks!

@luketomlinson
Copy link
Copy Markdown
Contributor Author

@t1m0thyj This should go out next week. See this PR

ybiquitous added a commit to ybiquitous/npm-diff-action that referenced this pull request Jul 1, 2021
ybiquitous added a commit to ybiquitous/npm-diff-action that referenced this pull request Jul 1, 2021
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 this pull request may close these issues.

Easier to get command output

3 participants