Coder Social home page Coder Social logo

yvm exec incorrectly expands glob about yvm HOT 6 CLOSED

noahnu avatar noahnu commented on September 6, 2024
yvm exec incorrectly expands glob

from yvm.

Comments (6)

iamogbz avatar iamogbz commented on September 6, 2024

@noahnu I'm not sure I understand your use case here or at least I could not reproduce the issue. yvm exec is supposed to be equivalent yarn, and I don't think yarn my-script.js works.

Also if I have something like

// package.json
  "scripts": {
    "say": "echo"
  }

then I get

$ yvm exec say "some/**/*.js"
yarn run v1.22.4
$ echo 'some/**/*.js'
some/**/*.js
Done in 0.09s.

from yvm.

noahnu avatar noahnu commented on September 6, 2024

I was modelling it after nvm exec with stylelint's glob option. Can put together a better repro in a bit

from yvm.

noahnu avatar noahnu commented on September 6, 2024

Hmm.. you're right. I still think there's an issue here, but my steps to reproduce are incorrect. I encountered this when trying to use yvm exec to run stylelint. The glob was being expanded. When I switched to use nvm exec, it worked.

I'll try put together a better example with stylelint directly.

from yvm.

iamogbz avatar iamogbz commented on September 6, 2024

I see what you mean

$ yvm exec fake './*.js'
yarn run v1.22.4
$ /workspace/yvm/node_modules/.bin/fake ./fake.js
[
  '/home/gitpod/.nvm/versions/node/v12.18.3/bin/node',
  '/workspace/yvm/node_modules/.bin/fake',
  './fake.js'
]
Done in 0.15s.

vs

$ yarn fake './*.js'
yarn run v1.22.4
$ /workspace/yvm/node_modules/.bin/fake './*.js'
[
  '/home/gitpod/.nvm/versions/node/v12.18.3/bin/node',
  '/workspace/yvm/node_modules/.bin/fake',
  './*.js'
]
Done in 0.14s.

Both of those were run by yvm and it seems like the culprit is, as you pointed out, the bash script expansion. 🐟 shell does not have this problem, proving without a doubt that it is the BASST!

from yvm.

iamogbz avatar iamogbz commented on September 6, 2024

Wrapping it in quotes does look like it'll fix this and probably is a breaking change to modify this behaviour 🤔

from yvm.

yvm-bot avatar yvm-bot commented on September 6, 2024

🎉 This issue has been resolved in version 4.0.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

from yvm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.