Git Product home page Git Product logo

Comments (5)

sudo-suhas avatar sudo-suhas commented on May 14, 2024

If I switch everything out to yarn, this happens:

λ git commit
husky > yarn run precommit (node v8.5.0)

yarn run v1.0.2
warning ..\package.json: No license field
$ npm run spawn

> [email protected] spawn E:\Projects\experiments\test-cross-spawn-env
> node spawn.js

warning ..\package.json: No license field
error Could not open cafile: ENOENT: no such file or directory, open 'E:\Projects\experiments\test-cross-spawn-env\undefined'
hello
,,
Done in 2.35s.

Does not fail but still causes an error somewhere.

from node-cross-spawn.

evocateur avatar evocateur commented on May 14, 2024

I found this to be a problem only in Windows (on AppVeyor hosts, specifically). Runs on linux (TravisCI) and OS X do not exhibit this problem.

The cheesy workaround is to add --no-onload-script to any npm calls, but as this is just duplicating what should be the default for that option, it's not a long-term solution.

from node-cross-spawn.

sudo-suhas avatar sudo-suhas commented on May 14, 2024

You could also filter process.env for undefined values to fix this issue. That was how we had fixed the issue in kcd-scripts and opt-cli.

from node-cross-spawn.

satazor avatar satazor commented on May 14, 2024

@sudo-suhas I've cloned the repository that you have created but I was unable to reproduce the error on Windows.

C:\Work\test-cross-spawn-env>git commit -m'foo'
husky > npm run -s precommit (node v8.9.1)

hello
,,
[master 030a66e] 'foo'
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 fdsfs.txt

C:\Work\test-cross-spawn-env>

I'm running node v8.9. Could you please help me reproduce?

from node-cross-spawn.

sudo-suhas avatar sudo-suhas commented on May 14, 2024

This is very odd but I am not able to reproduce the issue either. I am no longer seeing undefined values in process.env. This could be because I updated cmder version but I am not sure. I am closing this for now. I will reopen it if I am able to reproduce the issue.

from node-cross-spawn.

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.