SparkPost / heml

HEML is an open source markup language for building responsive email.
https://heml.io
MIT License
4.33k stars 157 forks source link

CLI doesn't resolve absolute paths #18

Closed atipugin closed 6 years ago

atipugin commented 6 years ago

CLI treats absolute path as relative. Example:

$ heml build /Users/atipugin/Desktop/test-heml/test.heml

Fails with:

ENOENT: no such file or directory, open '/Users/atipugin/Desktop/test-heml/Users/atipugin/Desktop/test-heml/test.heml'

Version is 1.0.2-0.

I think it should work with absolute paths too.

atipugin commented 6 years ago

https://github.com/SparkPost/heml/blob/26d988360f385e682d6f7c16a90fb45f0fe99562/packages/heml/src/bin/commands/build.js#L12

Maybe we could use path.resolve instead of joining with current workdir?

avigoldman commented 6 years ago

You're right, no reason not to use path.resolve instead of path.join. PR coming shortly.

avigoldman commented 6 years ago

@atipugin can you take a quick look at PR #24?

atipugin commented 6 years ago

@avigoldman looks good!