bash-shell-to-bat-converter
bash-shell-to-bat-converter copied to clipboard
Error when convert: Command substitution
node lib/cli.js uasp.sh
(script can be found here: https://github.com/kennethrisa/uasp)
return: D:\bash-shell-to-bat-converter\node_modules\bash-parser\src\index.js:52 throw new Error(err.stack || err.message); ^
Error: Parse error on line 34: Unexpected 'OPEN_PAREN'
at Object.parse [as default] (D:\bash-shell-to-bat-converter\node_modul
es\bash-parser\src\index.js:52:9)
at Object.convertBashToWin (D:\bash-shell-to-bat-converter\lib\convert-
bash.js:69:36)
at Object.
Windows 10 node 10.15.1
I've edited my post because the first line is not really used in this script so error can be ignored but now, i got a new error (see above) when trying convert... Thanks for any help
Hi @Owned67, there are several things that are not supported right now such as functions (#10) and command substition (see e.g. Stackoverflow). As both are non-trivial, they won't get fixed soon by me. If you want to contribute, I'd be happy to assist :)
Hello, i don't have time sorry...
trying your patch: node lib/cli.js uasp.sh F:\rust\bash-shell-to-bat-converter\lib\convert-bash.js:7 window = { process: { env: { NODE_NEV: 'mock' } } }; ^
ReferenceError: window is not defined
at Object.
Got the same issue as well
window = { process: { env: { NODE_NEV: 'mock' } } };
^
ReferenceError: window is not defined
Hi @Owned67 @flora8984461 The error with the window reference should be fixed with the latest version 2.0.1. Could you please check and confirm if this issue is resolved?
Hello
fresh install: downloaded https://github.com/daniel-sc/bash-shell-to-bat-converter/archive/v2.0.1.zip npm install return: updated 1 package and audited 32 packages in 8.948s found 0 vulnerabilities
npm run tsc return:
[email protected] tsc F:\rust\bash-shell-to-bat-converter tsc
command: node lib/cli.js uasp.sh return: `converting file: uasp.sh ... F:\rust\bash-shell-to-bat-converter\node_modules\bash-parser\src\index.js:52 throw new Error(err.stack || err.message); ^
Error: Parse error on line 34: Unexpected 'OPEN_PAREN'
at Object.parse [as default] (F:\rust\bash-shell-to-bat-converter\node_modules\bash-parser\src\index.js:52:9)
at Object.convertBashToWin (F:\rust\bash-shell-to-bat-converter\lib\convert-bash.js:109:36)
at Object.
+1 Just got the same new error
Hello
fresh install: downloaded https://github.com/daniel-sc/bash-shell-to-bat-converter/archive/v2.0.1.zip npm install return: updated 1 package and audited 32 packages in 8.948s found 0 vulnerabilities
npm run tsc return:
[email protected] tsc F:\rust\bash-shell-to-bat-converter tsc
command: node lib/cli.js uasp.sh return: `converting file: uasp.sh ... F:\rust\bash-shell-to-bat-converter\node_modules\bash-parser\src\index.js:52 throw new Error(err.stack || err.message); ^
Error: Parse error on line 34: Unexpected 'OPEN_PAREN' at Object.parse [as default] (F:\rust\bash-shell-to-bat-converter\node_modules\bash-parser\src\index.js:52:9) at Object.convertBashToWin (F:\rust\bash-shell-to-bat-converter\lib\convert-bash.js:109:36) at Object. (F:\rust\bash-shell-to-bat-converter\lib\cli.js:9:26) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Function.Module.runMain (internal/modules/cjs/loader.js:742:12) at startup (internal/bootstrap/node.js:283:19)`
closing this as a duplicate of #51 (I know, this predates the other issue, but here we have comments regarding another issue as well, so the other is cleaner..)