Skip to content

Commit

Permalink
🚑 Fix __filename
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Jan 23, 2025
1 parent 8cea80a commit 56375f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions bin/xrepo
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env node
const os = require('os');
const path = require('path');
const {spawnSync} = require('child_process');
const {resolve} = require('path');
const bin = resolve(__dirname, '..', 'prebuilds', `xmake-${os.platform()}-${os.arch()}`, 'bin', path.basename(__filename));
const cmd = spawnSync(bin, process.argv.slice(2))
console.log(cmd.stdout.toString())
console.error(cmd.stderr.toString())
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"keywords": ["xmake"],
"bin": {
"xmake": "bin/xmake",
"xrepo": "bin/xmake"
"xrepo": "bin/xrepo"
},
"devDependencies": {
"biome": "^0.3.3",
Expand Down

0 comments on commit 56375f2

Please sign in to comment.