-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Output available platforms for setup-qemu
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
- Loading branch information
CrazyMax
committed
Aug 11, 2020
1 parent
674ff6a
commit 2f906a9
Showing
5 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import * as actionsExec from '@actions/exec'; | ||
| import {ExecOptions} from '@actions/exec'; | ||
|
|
||
| export interface ExecResult { | ||
| success: boolean; | ||
| stdout: string; | ||
| stderr: string; | ||
| } | ||
|
|
||
| export const exec = async (command: string, args: string[] = [], silent: boolean): Promise<ExecResult> => { | ||
| let stdout: string = ''; | ||
| let stderr: string = ''; | ||
|
|
||
| const options: ExecOptions = { | ||
| silent: silent, | ||
| ignoreReturnCode: true | ||
| }; | ||
| options.listeners = { | ||
| stdout: (data: Buffer) => { | ||
| stdout += data.toString(); | ||
| }, | ||
| stderr: (data: Buffer) => { | ||
| stderr += data.toString(); | ||
| } | ||
| }; | ||
|
|
||
| const returnCode: number = await actionsExec.exec(command, args, options); | ||
|
|
||
| return { | ||
| success: returnCode === 0, | ||
| stdout: stdout.trim(), | ||
| stderr: stderr.trim() | ||
| }; | ||
| }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters