Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

run one npx command at once on windows #432

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mansona
Copy link

@mansona mansona commented Oct 31, 2023

This is taking @ef4's changes from ember-cli/ember-cli-update#1247 and actually submitting a PR here now that CI is fixed 馃帀

Essentially ember-cli/ember-cli-update#1246 is blocked because you can't run two npx processes at the same time because they can clobber the disk cache in a way that causes strange permissions issues.

This PR essentially runs each npx command in series if you're running on windows 馃憤

if (os.platform() === 'win32') {
// running two npx commands in parallel on Windows causes it to break the npx cache
// folders and throw strange permissions errors. We need to run them in series
startCommand = await reset || init ? null : _prepareCommand(startOptions);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put these in helper functions, so in both cases we just have prepareStart() and prepareEnd()?

let endCommand;

if (os.platform() === 'win32') {
// running two npx commands in parallel on Windows causes it to break the npx cache
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if there's any way to get a failing test for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants