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.

In the version 7.0.5 of zx there is an issue with escaping bash variables when there is a js var with a : character in it. This bug introduced in zx 7.0.4. when running version 7.0.3 there is no issue when going to 7.0.4 there is an issue

Expected Behavior

expected output: special/var:iable actual output: special/var:iable

Actual Behavior

expected output: special/var:iable actual ouput: $special/var:iable

whats wrong: the $ sign should not be there

Steps to Reproduce the Problem

  • create a file test.mjs
  • add follow script
const variable  ="special/var:iable"
await $`echo ${variable}`;
  • run npx zx@7.0.5 test.mjs

see repo https://github.com/geoffreysamper/zx-issue-7.05-escaping-vars

Specifications

  • Version: 7.0.5
  • Platform: ubuntu 22.04

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:28

github_iconTop GitHub Comments

1reaction
geoffreysampercommented, Jul 1, 2022

@antonmedv Found the issue. it a circular dependency. In the source of goods. the export of which is after the import of something for the core.

I found the error due adding console.log to the zx file and here the output. You can see in the console.log that the value of which is undefined. Then I lookat the goods.js and moved the import which to before the import of $ from core. I strange that this is not an issue on fedora and darwin.

image

so here i’m getting the error image

When I’m moving the which to before the import of the core.js then it works

image

0reactions
antonmedvcommented, Jul 1, 2022

Added madge to check for circular deps. And fixed the issue will publish the fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sign in to Google Ads
Go to the Google Ads homepage. · Click the Sign in link at the top right of the page. · Enter your Google...
Read more >
Google Ads - Sign in
Advertise with Google Ads in the Sponsored Links section next to search results to ... Sign in. to continue to Google Ads. Email...
Read more >
Home | Add-A-Sign | Leominster, MA 01453
Add -A-Sign 136 Pond Street Leominster, MA 01453. [P] 978-466-9000. Trade Show / Event Products · Privacy Policy. Share by:
Read more >
Sign in - Google Accounts - Ads Settings
Sign in. Use your Google Account. Email or phone. Forgot email? ... Type the text you hear or see. Not your computer? Use...
Read more >
Google Ads - Get More Customers & Generate Leads with ...
Discover how Google can help grow your business. Drive sales, generate leads & increase brand awareness with online ads.
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