Skip to content

Commit

Permalink
Rearrange a couple lines of embedded py code so 'env' can be handed t…
Browse files Browse the repository at this point in the history
…o find_templates(str, env) (#3)
  • Loading branch information
alanmpitts committed Jul 20, 2024
1 parent 328c763 commit db02e2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prefab.el
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ from cookiecutter.environment import StrictEnvironment
import os.path
ctx = %s
template_dir = find_template('%s')
dirname = os.path.split(template_dir)[1]
envvars = ctx.get('cookiecutter', {}).get('_jinja2_env_vars', {})
env = StrictEnvironment(context=ctx, keep_trailing_newline=True, **envvars)
template_dir = find_template('%s', env)
dirname = os.path.split(template_dir)[1]
output_dir = '%s'
name_tmpl = env.from_string(dirname)
Expand Down

0 comments on commit db02e2b

Please sign in to comment.