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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch #2559 for Windows #2561

Closed
wants to merge 3 commits into from
Closed

Patch #2559 for Windows #2561

wants to merge 3 commits into from

Conversation

ijlee2
Copy link
Contributor

@ijlee2 ijlee2 commented Oct 18, 2023

Description

As mentioned in #2558 (comment), on Windows, my team member @Ajanth wasn't able to run the desired server even after I updated ember-cli-mirage to v3.0.1 (see #2559).

We think the issue is related to config/environment.js#L14, due to process.env.PWD and the hardcoded /'s.

After replacing process.env.PWD with process.cwd() and / with path.join(), we checked that we can run the server on both Windows and Mac. On Mac, I saw the same value logged for (1), (2), and (3):

console.log('(1) ' + `${process.env.PWD}/server/proxies`);
console.log('(2) ' + path.join(process.env.PWD, 'server', 'proxies'));
console.log('(3) ' + path.join(process.cwd(), 'server', 'proxies'));

Note, a StackOverflow answer suggests that process.env.PWD and process.cwd() can have a different meaning (value) when the current directory is changed. I'm not sure if that difference would affect ember-cli-mirage.

@ijlee2 ijlee2 marked this pull request as ready for review October 18, 2023 09:59
@ijlee2 ijlee2 changed the title Patch #2560 for Windows Patch #2559 for Windows Oct 18, 2023
@ijlee2 ijlee2 closed this Oct 18, 2023
@ijlee2 ijlee2 deleted the patch-2560-for-windows branch October 18, 2023 10:05
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.

1 participant