-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
fix(utils): nuxt.config.js is not in cwd #9701
base: 2.x
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #9701 +/- ##
=======================================
Coverage 65.17% 65.17%
=======================================
Files 94 94
Lines 4109 4109
Branches 1127 1127
=======================================
Hits 2678 2678
Misses 1152 1152
Partials 279 279
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -169,7 +169,7 @@ export async function snapshot ({ globbyOptions, ignore, rootDir }) { | |||
const files = await globby('**/*.*', { | |||
...globbyOptions, | |||
ignore, | |||
cwd: rootDir, | |||
cwd: path.normalize(rootDir), |
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 think it would be better normalizing the path directly in @nuxt/config
(here) otherwise we will have inconsistent behavior.
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 would also check whether it works with upath.normalize
as that is what we use elsewhere.
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.
One downside of upath, is that it seems not supporting windows network mounts (that might be currently used by nuxt2 users). If path.normalize
solving issue with globby
is less risky change (till we have unpath
for better normalization)
This comment has been minimized.
This comment has been minimized.
El El mar, ago. 24, 2021 a la(s) 4:19 a. m., Ranulfo Garcia El
AltepeMerario ***@***.***> escribió:
…
El El mar, ago. 24, 2021 a la(s) 4:12 a. m., pooya parsa <
***@***.***> escribió:
> ***@***.**** commented on this pull request.
> ------------------------------
>
> In packages/cli/src/utils/generate.js
> <#9701 (comment)>:
>
> @@ -169,7 +169,7 @@ export async function snapshot ({ globbyOptions, ignore, rootDir }) {
> const files = await globby('**/*.*', {
> ...globbyOptions,
> ignore,
> - cwd: rootDir,
> + cwd: path.normalize(rootDir),
>
> One downside of upath, is that it seems not supporting windows network
> mounts (that might be currently used by nuxt2 users). If path.normalize
> solving issue with globby is less risky change (till we have unpath for
> better normalization)
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#9701 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ATOUUODH7EX2Q647F4YT4XLT6NPBFANCNFSM5CSSE6LA>
> .
>
|
@harishsg99 Would you confirm whether this change is still needed on the latest 2.16.2 (which has a newer version of globby than when you submitted this PR)? |
Types of changes
Description
this resolves #9640
Checklist: