You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been experimenting with the new Bun JavaScript runtime and have found that yargs does not understand this new runtime. When referencing the $0 variable in yargs, it return "bun" instead of the script being run. As a quick hack, I modified index.cjs to include "bun" to the Regex statement:
/\b(node|iojs|electron)(\.exe)?$/
which becomes
/\b(node|iojs|electron|bun)(\.exe)?$/
This works and $0 now correctly reflects the script being executed. I would propose that a single line in yargs-factory.js be changed to the following so that index.cjs is updated with the new check:
if (/\b(node|iojs|electron|bun)(\.exe)?$/.test(__classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv()[0])) {
The text was updated successfully, but these errors were encountered:
I have been experimenting with the new Bun JavaScript runtime and have found that yargs does not understand this new runtime. When referencing the $0 variable in yargs, it return "bun" instead of the script being run. As a quick hack, I modified index.cjs to include "bun" to the Regex statement:
/\b(node|iojs|electron)(\.exe)?$/
which becomes
/\b(node|iojs|electron|bun)(\.exe)?$/
This works and $0 now correctly reflects the script being executed. I would propose that a single line in yargs-factory.js be changed to the following so that index.cjs is updated with the new check:
if (/\b(node|iojs|electron|bun)(\.exe)?$/.test(__classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv()[0])) {
The text was updated successfully, but these errors were encountered: