Skip to content

Commit

Permalink
Update config error message for outDir infinity loop error (#8220)
Browse files Browse the repository at this point in the history
Co-authored-by: Elian ☕️ <[email protected]>
Co-authored-by: Emanuele Stoppa <[email protected]>
  • Loading branch information
3 people authored Aug 25, 2023
1 parent 6606245 commit 2c07656
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/astro/src/core/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ export function createRelativeSchema(cmd: string, fileProtocolRoot: string) {
})
.refine((obj) => !obj.outDir.toString().startsWith(obj.publicDir.toString()), {
message:
'`outDir` must not be placed inside `publicDir` to prevent an infinite loop. Please adjust the directory configuration and try again',
'The value of `outDir` must not point to a path within the folder set as `publicDir`, this will cause an infinite loop',
});

return AstroConfigRelativeSchema;
Expand Down
3 changes: 1 addition & 2 deletions packages/astro/test/units/config/config-validate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ describe('Config Validation', () => {
);
expect(configError instanceof z.ZodError).to.equal(true);
expect(configError.errors[0].message).to.equal(
'`outDir` must not be placed inside `publicDir` to prevent an infinite loop. \
Please adjust the directory configuration and try again'
'The value of `outDir` must not point to a path within the folder set as `publicDir`, this will cause an infinite loop'
);
});
});

0 comments on commit 2c07656

Please sign in to comment.