Skip to content

Commit

Permalink
Merge pull request #2141 from sheinsight/fix-publish
Browse files Browse the repository at this point in the history
fix: fix publish
  • Loading branch information
saint3347 authored Sep 24, 2024
2 parents 6ab75a1 + de04739 commit 3e2b1da
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,21 @@ const validateFile = () => {

const publishPackage = () => {
const distPath = path.resolve(__dirname, `../publish`)
exec(`npm publish ${distPath} --access public${tag ? ` --tag ${tag}` : ''}`, (error, stdout) => {
exec(`npm publish ${distPath} --access public${tag ? ` --tag ${tag}` : ''}`, (error, stdout, stderr) => {
if (error) {
console.error(error)
console.error('Error occurred:', error)
console.error('Standard error output:', stderr)
process.exit(1)
return
}
console.log(stdout)
console.log('Standard output:', stdout)
})
}

try {
validateFile()
publishPackage()
} catch (error) {
console.error(error)
console.log('Publish error:', error)
process.exit(1)
}

0 comments on commit 3e2b1da

Please sign in to comment.