oakmac / standard-clojure-style-js

Standard Clojure Style in JavaScript
ISC License
33 stars 1 forks source link

Running formatter via NPX fails because the script is interpreted as shell #94

Closed alexandercampbell closed 1 month ago

alexandercampbell commented 1 month ago

I cannot run the formatter via npx. The script is interpreted as shell rather than JS.

~/tmp 0 λ npx @chrisoakman/standard-clojure-style@latest fix example.clj
/Users/alexander/.npm/_npx/eb186f45d353568b/node_modules/.bin/standard-clj: line 1: //: is a directory
/Users/alexander/.npm/_npx/eb186f45d353568b/node_modules/.bin/standard-clj: line 2: //: is a directory
/Users/alexander/.npm/_npx/eb186f45d353568b/node_modules/.bin/standard-clj: line 3: //: is a directory
/Users/alexander/.npm/_npx/eb186f45d353568b/node_modules/.bin/standard-clj: line 4: //: is a directory
/Users/alexander/.npm/_npx/eb186f45d353568b/node_modules/.bin/standard-clj: line 5: //: is a directory
/Users/alexander/.npm/_npx/eb186f45d353568b/node_modules/.bin/standard-clj: line 6: //: is a directory
/Users/alexander/.npm/_npx/eb186f45d353568b/node_modules/.bin/standard-clj: line 8: //: is a directory
Version: ImageMagick 7.1.1-38 Q16-HDRI aarch64 22398 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(5.0)
Delegates (built-in): bzlib fontconfig freetype gslib heic jng jp2 jpeg jxl lcms lqr ltdl lzma openexr png ps raw tiff webp xml zlib zstd
Compiler: gcc (4.2)
Usage: import [options ...] [ file ]

-- snip --

I think the problem was caused by removing the shebang from cli.mjs in a3ed01beda6249dab1b0a540a3b4b23b7aa68a2e.

Platform:

alexandercampbell commented 1 month ago

I've repro'd this issue with these tool versions:

oakmac commented 1 month ago

Fixed with PR-96

I removed the shebang line because I wanted the ability to run cli.mjs using bun without having to specify --bun.

oakmac commented 1 month ago

Fixed with v0.4.1 :+1: