keycloak-config-cli icon indicating copy to clipboard operation
keycloak-config-cli copied to clipboard

javascript Variable Substitution

Open taxone opened this issue 1 year ago • 1 comments

Current Behavior

I'm trying to use javascript for variable substitution, as indicated in the documentation:

Script: $(script:javascript:3 + 4)

but it seems that it does not work properly.

Expected Behavior

The KeyCloak JSON file contains this line:

"enabled": $(script:javascript:"$(env:APP_ENV)" === "INT"),

The environment variable is defined and its value is 'INT'. When the CLI is executed I get the error below :

java.lang.IllegalArgumentException: Cannot resolve variable 'script:javascript:"INT" === "INT"' (enableSubstitutionInVariables=true)

Steps To Reproduce

No response

Environment

  • Keycloak Version: 20.0.5
  • keycloak-config-cli Version: 8.5.0
  • Java Version:11

Anything else?

No response

taxone avatar Oct 10 '23 16:10 taxone

I am seeing the same behavior wirh an even more basic expression: $(script:javascript:2*24*60*60)

vwegert-mag avatar Feb 14 '24 10:02 vwegert-mag