Skip to content
This repository was archived by the owner on Jun 3, 2023. It is now read-only.

Commit 052f081

Browse files
author
Victor Navarro
committed
chore: bash pipe
1 parent 1629f3d commit 052f081

File tree

3 files changed

+3
-39
lines changed

3 files changed

+3
-39
lines changed

dist/index.js

Lines changed: 1 addition & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,7 @@ import * as exec from '@actions/exec';
33
import commandExists from 'command-exists';
44

55
const installWithBash = async () => {
6-
let output = '';
7-
let error = '';
8-
9-
const options = {
10-
listeners: {
11-
stdout: (data: Buffer) => {
12-
output += data.toString();
13-
},
14-
stderr: (data: Buffer) => {
15-
error += data.toString();
16-
},
17-
},
18-
};
19-
20-
await exec.exec('curl', ['-sL', 'https://firebase.tools'], options);
21-
22-
if (error) {
23-
throw new Error(error);
24-
}
25-
26-
await exec.exec('bash', [output]);
6+
await exec.exec('curl', ['-sL', 'https://firebase.tools', '|', 'bash']);
277
};
288

299
const run = async () => {

0 commit comments

Comments
 (0)