hookstack-cli 0.1.11 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/cli.mjs +5 -4
  2. package/package.json +1 -1
package/bin/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { readFileSync, writeFileSync, mkdirSync, existsSync } from 'fs'
2
+ import { readFileSync, writeFileSync, mkdirSync, existsSync, realpathSync } from 'fs'
3
3
  import { createInterface } from 'readline'
4
4
  import { homedir } from 'os'
5
5
  import { join, dirname } from 'path'
@@ -247,7 +247,8 @@ async function main() {
247
247
  else await directInstall(args.hooks, args)
248
248
  }
249
249
 
250
- /* v8 ignore next 3 */
251
- if (process.argv[1] === fileURLToPath(import.meta.url)) {
252
- main()
250
+ /* v8 ignore next 4 */
251
+ const _argv1 = (() => { try { return realpathSync(process.argv[1]) } catch { return process.argv[1] } })()
252
+ if (_argv1 === fileURLToPath(import.meta.url)) {
253
+ main().catch(err => { console.error(pc.red(`\n✗ ${err.message || err}`)); process.exit(1) })
253
254
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hookstack-cli",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "CLI installer for the Hookstack catalogue of Claude Code hooks",
5
5
  "type": "module",
6
6
  "bin": {