Update config error message for outDir
infinity loop error (#8220)
Co-authored-by: Elian ☕️ <hello@elian.codes>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
This commit is contained in:
parent
6606245b35
commit
2c07656c8d
2 changed files with 2 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue