Skip to content

Commit 631571b

Browse files
committed
fix(cubejs-cli): Fix validate command
1 parent 91d57de commit 631571b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/cubejs-cli/src/command/validate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ async function validate(options) {
2121
});
2222
} catch (error: any) {
2323
console.log('❌ Cube Schema validation failed');
24-
displayError(error.messages);
24+
displayError(error.messages || error.message);
2525
return;
2626
}
2727

packages/cubejs-schema-compiler/src/compiler/DataSchemaCompiler.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,9 @@ export class DataSchemaCompiler {
546546
// Alias "securityContext" with "security_context" (snake case version)
547547
// to support snake case based data models
548548
cloneCompileContextWithGetterAlias(compileContext) {
549-
const clone = R.clone(compileContext || {});
550-
clone.security_context = compileContext.securityContext;
549+
const ctx = compileContext || {};
550+
const clone = R.clone(ctx);
551+
clone.security_context = ctx.securityContext;
551552
return clone;
552553
}
553554

0 commit comments

Comments
 (0)