Skip to content

Partial template substitution with \ before {{ dont work #201

@blindzero

Description

@blindzero

Description

Substitution of template strings {{...}} dont work if "" is part of the whole string directly in front of the {{

Steps to Reproduce

  1. Have a step with Identitykey = 'DOMAIN\{{Request.IdentityKeys.sAMAccountName}}'
  2. Execute New-IdlePlan
  3. Get Error

Also tried with escaping Identitykey = 'DOMAIN\\{{Request.IdentityKeys.sAMAccountName}}' or Identitykey = 'DOMAIN{{Request.IdentityKeys.sAMAccountName}}'` with same error.

Expected Behavior

\ should remain as part of the literal, but {{...}} is substituted.

Actual Behavior

Error

OperationStopped: src\IdLE.Core\Private\Resolve-IdleTemplateString.ps1:224:13 
Line | 
 224 |              throw [System.ArgumentException]::new(
     |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Template syntax error in step 'AD - Disable account': Unbalanced braces in value 'NANOTEMPER\{{Request.IdentityKeys.sAMAccountName}}'. Found 0 opening '{{' and 1 closing '}}'. Check for typos or missing braces. (Parameter 'Workflow')

Environment

  • PowerShell version: 7.5.4
  • OS: Windows Server 2019
  • IdLE version / commit: main branch

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions