diff options
author | 2023-08-25 11:25:59 -0300 | |
---|---|---|
committer | 2023-08-25 15:25:59 +0100 | |
commit | 2c07656c8d72c08dd6c2b9ddc1a5000ca1c55496 (patch) | |
tree | 93a21ec36d50c66ed485b3c85db03fd60d936950 | |
parent | 6606245b35a3dfb69fa16504fceb246135503a10 (diff) | |
download | astro-2c07656c8d72c08dd6c2b9ddc1a5000ca1c55496.tar.gz astro-2c07656c8d72c08dd6c2b9ddc1a5000ca1c55496.tar.zst astro-2c07656c8d72c08dd6c2b9ddc1a5000ca1c55496.zip |
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>
-rw-r--r-- | packages/astro/src/core/config/schema.ts | 2 | ||||
-rw-r--r-- | packages/astro/test/units/config/config-validate.test.js | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/packages/astro/src/core/config/schema.ts b/packages/astro/src/core/config/schema.ts index e0ddeb268..da737ebc0 100644 --- a/packages/astro/src/core/config/schema.ts +++ b/packages/astro/src/core/config/schema.ts @@ -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; diff --git a/packages/astro/test/units/config/config-validate.test.js b/packages/astro/test/units/config/config-validate.test.js index 604836747..48088468a 100644 --- a/packages/astro/test/units/config/config-validate.test.js +++ b/packages/astro/test/units/config/config-validate.test.js @@ -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' ); }); }); |