Skip to content

Commit

Permalink
fix: 执行二进制文件失败
Browse files Browse the repository at this point in the history
  • Loading branch information
hubvue committed Apr 17, 2022
1 parent 56607de commit 6c00390
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env node
const { spawn } = require('child_process')
const { resolve } = require('path')

const executeBinary = async () => {
const [, , ...args] = process.argv
const options = { cwd: process.cwd(), stdio: "inherit" }

return spawn('./camer', args, options)
return spawn(resolve(__dirname, './camer'), args, options)
}

executeBinary().catch((e) => console.error(e))

0 comments on commit 6c00390

Please sign in to comment.