Open fucksophie opened 5 months ago
Hey @fucksophie, we have e2e tests that test the built package on ubuntu and it seems to work ok. I also just tested on Ubuntu myself manually via npx
(v2.0.0). (command used: npx fta-cli example-dir
)
Can you confirm how you are using fta & what OS this is happening on?
As indicated in the issue report, this is Linux. The fta-cli index.js uses CRLFs, and this doesn't work on linux. You can see the bug in action here: https://git.sad.ovh/sophie/trillium/actions/runs/1
Sidenote: I am using bunx.
Thanks. It looks like this is specific to Bun, not linux:
root@DESKTOP-G5OFQHB:~# npx fta-cli fta-test
┌─────────────────────────────────┬────────────┬─────────────────────────────┬────────────┐
│ File ┆ Num. lines ┆ FTA Score (Lower is better) ┆ Assessment │
╞═════════════════════════════════╪════════════╪═════════════════════════════╪════════════╡
│ node_modules/fta-cli/index.js ┆ 64 ┆ 44.91 ┆ OK │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┤
│ node_modules/fta-cli/check.js ┆ 29 ┆ 39.50 ┆ OK │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┤
│ node_modules/fta-cli/targets.js ┆ 10 ┆ 8.16 ┆ OK │
└─────────────────────────────────┴────────────┴─────────────────────────────┴────────────┘
3 files analyzed in 0.0019s.
root@DESKTOP-G5OFQHB:~# bunx fta-cli fta-test
/usr/bin/env: ‘node\r’: No such file or directory
I'm not sure why bun has this problem and node doesn't
Hello, this issue is really simple. Hopefully it's fixed soon.
The \r indicates that the shebang's newline is using CRLF's, which are opposite to Linux's LF's. To fix this, you have to run
dos2unix ./node_modules/fta-cli/index.js
.