Skip to content

Commit 9c11296

Browse files
committed
fix(brew): updates from PR review. remove unneeded error throw and unused code
1 parent 9ac979a commit 9c11296

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

release/scripts/homebrew.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ const { pipeline } = require('stream')
1111
const crypto = require('crypto')
1212
const AWS = require('aws-sdk')
1313

14-
// const { createReadStream } = fs
1514
const NODE_JS_BASE = 'https://nodejs.org/download/release'
1615
const CLI_DIR = path.join(__dirname, '..', '..')
1716
const DIST_DIR = path.join(CLI_DIR, 'dist')
@@ -71,7 +70,6 @@ async function uploadToS3(file) {
7170
fileStream.on('error', err => {
7271
if (err) {
7372
reject(err)
74-
throw err
7573
}
7674
})
7775
fileStream.on('open', () => {
@@ -121,7 +119,6 @@ async function uploadToS3(file) {
121119
err => {
122120
if (err) {
123121
reject(err)
124-
throw err
125122
}
126123
}
127124
)
@@ -147,7 +144,6 @@ async function updateCgFormula(brewDir) {
147144
const templatePath = path.join(TEMPLATES, 'cg.rb')
148145
const template = fs.readFileSync(templatePath).toString('utf-8')
149146
const files = getFilesByOS('darwin-x64')
150-
console.log(files)
151147
const zipFile = files.find(file => file.includes('tar.gz'))
152148
const pathToFile = path.join(pathToDist, zipFile)
153149
const sha256 = await calculateSHA256(pathToFile)
@@ -229,6 +225,7 @@ async function updateHomebrew() {
229225
await git(['push', 'origin', 'main'])
230226
}
231227
} catch (e) {
228+
console.log('Error attempting to update git repo')
232229
console.log(e)
233230
}
234231
}

0 commit comments

Comments
 (0)