Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that these are functionally equivalent.
execa
has an option to use a shell as wellThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that's what I thought, but something funky must be going on, if you add an .npmrc to one of the templates pointing to a private npm registry and include a dependency from that private registry, you'll see that
execa
doesn't work at allThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agilgur5
await execa(cmd, getInstallArgs(cmd, deps), { shell: true })
does not workThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agilgur5 Any update? Can this go in or what changes should I make? Would rather not maintain a fork of TSDX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't expect an immediate response only 24 hours after you took 5 days to respond to a comment... I pay companies for premium support and don't get a response that fast, but you're asking a volunteer to respond faster than that and than you yourself did, for a private registry feature at that.
That's counterproductive and does the opposite of motivating maintainers.
It sounds like you already are if you have custom templates??? You said yourself "I was building a modified version of TSDX"...
tsdx create
does not create an.npmrc
and all deps it installs are public, so there's no need for one, except in a forkWe have also generally recommend
patch-package
when one needs further customization and this is a good use-case for itThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sounds like this is an upstream issue in
execa
and so I think an issue should be filed there. I looked there and there actually is an existing issue on this exact topic: sindresorhus/execa#380The fix there is to use
cwd
. If that resolves it, I think it would be a much better option than usingshelljs
which has various explicit caveats to its usage (several listed inexeca
'sshell
option that I linked previously). If it doesn't, I'd suggest filing an issue upstream