Skip to content

Commit 1420a40

Browse files
fix: log complete error of ajv validation (#2065)
Co-authored-by: jeho <[email protected]>
1 parent 96003c8 commit 1420a40

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/cmd/validate-values.ts

+2-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Ajv, { DefinedError, ValidateFunction } from 'ajv'
1+
import Ajv, { ValidateFunction } from 'ajv'
22
import { unset } from 'lodash'
33
import { prepareEnvironment } from 'src/common/cli'
44
import { terminal } from 'src/common/debug'
@@ -49,15 +49,7 @@ export const validateValues = async (envDir = env.ENV_DIR): Promise<void> => {
4949
if (val) {
5050
d.log('Values validation SUCCESSFUL')
5151
} else {
52-
validate.errors?.map((error: DefinedError) =>
53-
d.error('%O', {
54-
keyword: error.keyword,
55-
dataPath: error.instancePath,
56-
schemaPath: error.schemaPath,
57-
params: error.params,
58-
message: error.message,
59-
}),
60-
)
52+
d.error(JSON.stringify(validate.errors, null, 2))
6153
throw new Error('Values validation FAILED')
6254
}
6355
}

0 commit comments

Comments
 (0)