straightdave / eps

A templating engine for PowerShell

Home Page:http://straightdave.github.io/eps/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Variables whose name is other than `name` or `name_value` don't work in script

ooker777 opened this issue · comments

Say I have this test.esp:

Without underscore: <%= $name %>
With underscore: <%= $name_value %>

If I run it directly on shell, it works fine:

$name = 'ABC'
$name_value = 'ABC'

Invoke-EpsTemplate -Path .\test.esp
Without underscore: ABC
With underscore: ABC

But if I put them in a build.ps1 script:

$name = 'ABC'
$name_value = 'ABC'
Invoke-EpsTemplate -Path .\test.esp

Then it doesn't work:

.build.ps1
Without underscore: ABC
With underscore:

This is also true for any variable name I try, except name and name_value. Even name_values doesn't work. Why is that?