{"action":"closed","issue":{"url":"https://api.github.com/repos/mde/ejs/issues/324","repository_url":"https://api.github.com/repos/mde/ejs","labels_url":"https://api.github.com/repos/mde/ejs/issues/324/labels{/name}","comments_url":"https://api.github.com/repos/mde/ejs/issues/324/comments","events_url":"https://api.github.com/repos/mde/ejs/issues/324/events","html_url":"https://github.com/mde/ejs/issues/324","id":279233568,"number":324,"title":"Why does include preprocessor directive require a filename?","user":{"login":"zachleat","id":39355,"avatar_url":"https://avatars2.githubusercontent.com/u/39355?v=4","gravatar_id":"","url":"https://api.github.com/users/zachleat","html_url":"https://github.com/zachleat","followers_url":"https://api.github.com/users/zachleat/followers","following_url":"https://api.github.com/users/zachleat/following{/other_user}","gists_url":"https://api.github.com/users/zachleat/gists{/gist_id}","starred_url":"https://api.github.com/users/zachleat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zachleat/subscriptions","organizations_url":"https://api.github.com/users/zachleat/orgs","repos_url":"https://api.github.com/users/zachleat/repos","events_url":"https://api.github.com/users/zachleat/events{/privacy}","received_events_url":"https://api.github.com/users/zachleat/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-12-05T03:30:14Z","updated_at":"2017-12-30T03:27:45Z","closed_at":"2017-12-30T03:27:45Z","author_association":"NONE","body":"If I use `render` on a `compile(\"<% include /included %>\")`, it throws an error even when my `root` is set properly and the template is resolved correctly.\r\n\r\nLooks like it has to do with `resolveInclude` and an undefined argument to `path.resolve`. If I make the following change it works ok:\r\n\r\n```diff\r\n- var includePath = resolve(isDir ? filename : dirname(filename), name);\r\n+ var includePath = filename ? resolve(isDir ? filename : dirname(filename), name): resolve(name);\r\n```\r\n\r\nBut then looking through the tests it looks like you might expect this behavior? Is that right?"}}
{"actor":{"display_login":"zachleat"}}