Skip to content

Package config variables not available to npm-alternatives #201

@ryansalerno

Description

@ryansalerno

A quick repro case:

"config": {
	"foo": "bar"
},
"scripts": {
	"vars": "echo $npm_package_config_foo",
	"fails": "run-s vars",
	"works": "npm run vars"
}

npm run ___ can run any of the three scripts successfully (as you'd expect).

pnpm can run vars directly or works, but fails on fails with:

 ERROR   ERROR  Unknown options: '<pkgname>:foo'

I suspect this is very related to #193, but the description there sounded like it was coming at this error from a different direction, so I didn't want to hijack Jakob's issue.

I haven't tested yarn, though #196 sounds like a similar fix could potentially address issues there as well? Especially since a script of yall -s vars runs successfully with pnpm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions