diff --git a/src/lib/EngineOptionsFactory.ts b/src/lib/EngineOptionsFactory.ts index e4cfdcc2e..f6923863e 100644 --- a/src/lib/EngineOptionsFactory.ts +++ b/src/lib/EngineOptionsFactory.ts @@ -29,8 +29,8 @@ abstract class CommonEngineOptionsFactory implements EngineOptionsFactory { if (this.shouldSfgeRun(inputs)) { const sfgeConfig: SfgeConfig = { projectDirs: this.inputProcessor.resolveProjectDirPaths(inputs), - cachepath: inputs.cachepath, - enablecaching: inputs.enablecaching + cachepath: inputs.cachepath as string, + enablecaching: inputs.enablecaching as boolean }; options.set(CUSTOM_CONFIG.SfgeConfig, JSON.stringify(sfgeConfig)); } diff --git a/src/lib/sfge/SfgeWrapper.ts b/src/lib/sfge/SfgeWrapper.ts index 4ec616f99..e6434e690 100644 --- a/src/lib/sfge/SfgeWrapper.ts +++ b/src/lib/sfge/SfgeWrapper.ts @@ -242,7 +242,7 @@ export class SfgeExecuteWrapper extends AbstractSfgeWrapper { if (this.ruleDisableWarningViolation != null) { flags.push(`-DSFGE_RULE_DISABLE_WARNING_VIOLATION=${this.ruleDisableWarningViolation.toString()}`); } - if (this.enablecaching) { + if (this.enablecaching != null && this.enablecaching) { flags.push(`-DSFGE_DISABLE_CACHING=false`); } if (this.cachepath != null) {