n4bb12 / verdaccio-github-oauth-ui

📦🔐 GitHub OAuth plugin for Verdaccio
https://verdaccio.org
MIT License
74 stars 45 forks source link

Broken CLI in 2.3.3? #58

Closed ganapativs closed 4 years ago

ganapativs commented 4 years ago

Bug Report

CLI breaks with error syntax error near unexpected token `(' when run with npx verdaccio-github-oauth-ui --registry https://registry.website.com/.

Screenshot 2020-08-14 at 3 49 46 PM

Versions

Version
node.js 12.14.0 and 14.8.0
verdaccio 4.7.1
verdaccio-github-oauth-ui (Plugin) 2.2.4
verdaccio-github-oauth-ui (CLI) 2.3.3

Expected behavior

CLI should open the web browser and authenticate.

Observed behaviour

CLI breaks with error syntax error near unexpected token `('. CLI works fine till 2.3.2. Breaks in 2.3.3

Steps to reproduce

  1. Run npx verdaccio-github-oauth-ui --registry https://registry.website.com/(Or run with exact version number. npx verdaccio-github-oauth-ui@2.3.3 --registry https://registry.website.com/)
  2. CLI should break with error syntax error near unexpected token `('
n4bb12 commented 4 years ago

Sorry for the trouble 😔

The CLI build output did not have a node shebang, so it was being interpreted as a shell script.

I re-published it with a shebang https://github.com/n4bb12/verdaccio-github-oauth-ui/releases/tag/2.3.4 and changed local runs of the CLI to rely on the shebang as well.