Skip to content

Commit a302c9c

Browse files
committed
fix(cli): upload GitHub assets issue
1 parent 47a0d1a commit a302c9c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cli/src/pre-publish.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createReadStream, existsSync, statSync } from 'fs'
1+
import { existsSync, statSync } from 'fs'
22
import { join } from 'path'
33

44
import { Octokit } from '@octokit/rest'
@@ -9,6 +9,7 @@ import { getNapiConfig } from './consts'
99
import { debugFactory } from './debug'
1010
import { spawn } from './spawn'
1111
import { updatePackageJson } from './update-package'
12+
import { readFileAsync } from './utils'
1213
import { VersionCommand } from './version'
1314

1415
const debug = debugFactory('prepublish')
@@ -114,7 +115,7 @@ export class PrePublishCommand extends Command {
114115
'content-type': 'application/octet-stream',
115116
},
116117
// @ts-expect-error
117-
data: createReadStream(dstPath),
118+
data: await readFileAsync(dstPath),
118119
})
119120
console.info(`${chalk.green(dstPath)} upload success`)
120121
console.info(

0 commit comments

Comments
 (0)