question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when convert: Command substitution

See original GitHub issue

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.<anonymous> (D:\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)

Windows 10 node 10.15.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Owned67commented, Jul 16, 2020

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.<anonymous> (F:\rust\bash-shell-to-bat-converter\lib\convert-bash.js:7:12) 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 Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object.<anonymous> (F:\rust\bash-shell-to-bat-converter\lib\cli.js:5:22) at Module._compile (internal/modules/cjs/loader.js:689:30)

0reactions
daniel-sccommented, Nov 24, 2022

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…)

Read more comments on GitHub >

github_iconTop Results From Across the Web

linux - Error with command substitution, bash and pipes
1 Answer 1 · I am trying to do your first suggestion, parse out the 'updateavaialble' value. When I try your suggestion, $res...
Read more >
Bash Bad Substitution Syntax Error: Simple and Quick Fixes
It's a syntax error that occurs when you execute your Bash script and it can be caused by different reasons. Two common causes...
Read more >
Tab Autocomplete "Command Substitution error" - Ask Ubuntu
In you bash_completion file there is a function called _ip_address that has a variable assignment that spans five lines.
Read more >
Nested command substitution fails? · Issue #4074 - GitHub
I expect nu to output the number of seconds until 7PM. Screenshots. No response. Configuration. key, value. version, 0.37.0. build_os ...
Read more >
2. Shell Command Language
During token recognition no substitutions shall be actually performed, and the result token shall contain exactly the characters that appear in the input...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found