gajus / pg-formatter

A PostgreSQL SQL syntax beautifier.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CLI interface broken - node execution context missing

adroste opened this issue Β· comments

Hey. Handy wrapper πŸ‘.

For me (v2.0.2) the CLI interface cannot be called directly:

❯ npm install pg-formatter -g
❯ pg-formatter --help
/opt/homebrew/bin/pg-formatter: line 1: use strict: command not found
/opt/homebrew/bin/pg-formatter: line 2: syntax error near unexpected token `('
/opt/homebrew/bin/pg-formatter: line 2: `var __importDefault = (this && this.__importDefault) || function (mod) {'

Same for installing this as devDependency and trying to call it via npx pg-formatter

Workaround for now is: ❯ node node_modules/.bin/pg-formatter

The dist file is missing: #!/usr/bin/env node at the top

πŸŽ‰ This issue has been resolved in version 2.0.3 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€