Skip to content

Commit 7a09839

Browse files
committed
fixed eslint errors
Signed-off-by: Jeromy Cannon <[email protected]>
1 parent 591c7ef commit 7a09839

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Diff for: src/core/package_downloader.mjs

+9-5
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class PackageDownloader {
6363
urlExists (url) {
6464
const self = this
6565

66-
return new Promise((resolve, reject) => {
66+
return new Promise((resolve) => {
6767
try {
6868
self.logger.debug(`Checking URL: ${url}`)
6969
let req
@@ -147,7 +147,7 @@ export class PackageDownloader {
147147
* Compute hash of the file contents
148148
* @param {string} filePath - path of the file
149149
* @param {string} [algo] - hash algorithm
150-
* @returns {Promise<>} returns hex digest of the computed hash
150+
* @returns {Promise<string>} returns hex digest of the computed hash
151151
* @throws Error if the file cannot be read
152152
*/
153153
computeFileHash (filePath, algo = 'sha384') {
@@ -249,15 +249,19 @@ export class PackageDownloader {
249249
* @param {boolean} [force] - whether to download even if the file exists
250250
* @returns {string} full path to the downloaded file
251251
*/
252-
fetchPlatform (tag, destDir, force = false) {
252+
async fetchPlatform (tag, destDir, force = false) {
253253
if (!tag) throw new MissingArgumentError('tag is required')
254-
if (!destDir) throw new MissingArgumentError('destination directory path is required')
254+
if (!destDir) {
255+
throw new MissingArgumentError(
256+
'destination directory path is required')
257+
}
255258

256259
const releaseDir = Templates.prepareReleasePrefix(tag)
257260
const downloadDir = `${destDir}/${releaseDir}`
258261
const packageURL = `${constants.HEDERA_BUILDS_URL}/node/software/${releaseDir}/build-${tag}.zip`
259262
const checksumURL = `${constants.HEDERA_BUILDS_URL}/node/software/${releaseDir}/build-${tag}.sha384`
260263

261-
return this.fetchPackage(packageURL, checksumURL, downloadDir, 'sha384', force)
264+
return await this.fetchPackage(packageURL, checksumURL, downloadDir,
265+
'sha384', force)
262266
}
263267
}

0 commit comments

Comments
 (0)