Closed plurry closed 4 months ago
This is a bug. Fx should check if file exists first.
On macos it works:
Got the error:
}'
at Module.statSync (node:fs:1659:25)
at isFile (/private/var/folders/2j/0x_1mj9j4tz5hzqghjckptj80000gn/T/fx-34.0.0.js:275:19)
at main (/private/var/folders/2j/0x_1mj9j4tz5hzqghjckptj80000gn/T/fx-34.0.0.js:35:7) {
errno: -63,
code: 'ENAMETOOLONG',
syscall: 'stat',
path: 'x => {\n' +
' const thisVariableNameEatsUpPreciousCharacters = {\n' +
" hereAreMoreCharacters: '💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀dsasdfaskjdfhaskldjfhgaslkdjfhasdlkfjhasdlkfjhasdlfkjhasdflkjasdhflkjasdhflacnskdcfhalsdkfjhasldkfjhcasdlckfajhdsflbkasjdhfclnaskdjhfalskdfgjhsdflkfjhasdlfkahjsdflkasjhdflkafdggrhdfggsdfghsdghadfgsdfgsdfglhadshfglaksjdfhalskjdfhasldkfjhaldfkjhasdlfkjhasdflkjhadflkhasdlkfjhdfkhjasdlfkjhasdflkhaflkcansdfhvlkvajhfgvbalergtcqwaleifhavslbkfchasdblkfhldsfhasdfasfasdfdfdddddddadlakfjhas;dlkfa💀'\n" +
Fixed.
fx
tries to open the first argument as a file even when the JSON data comes fromstdin
. This causes it to crash when a single transformation command is too long.On my ext4 system, this:
crashes with this:
I guess it can usually be worked around by splitting the commands up into multiple arguments, but it's still annoying.