Skip to content
This repository has been archived by the owner on Feb 9, 2019. It is now read-only.

[Dust] Generated template doesn't work on Windows #2

Closed
leodagdag opened this issue Apr 7, 2012 · 1 comment
Closed

[Dust] Generated template doesn't work on Windows #2

leodagdag opened this issue Apr 7, 2012 · 1 comment

Comments

@leodagdag
Copy link

Hello,

Thanks a lot for this plugin.

This issue is related to https://groups.google.com/forum/?fromgroups&hl=fr#!searchin/play-framework/2.0$20dust/play-framework/2n4aYP45H6Q/Q3tE5YSlOJIJ

There is a little issue using it on Windows. The generated template looks like this :

(function(){dust.register("D:\dev\play-plugins\dust\sample\app\assets\example.tl",body_0);...

which doesn't work !

The mistake is in https://github.com/typesafehub/play-plugins/blob/master/dust/src/main/scala/com/typesafe/plugin/DustTasks.scala.
The last character added to assertDir is /, before replacement by "" which works on Linux/Mac but not on Windows ;)

val msg = compile(sourceFile.getPath.replace(assetsDir.getPath + "/", ""), IO.read(sourceFile)).left.map {
              case (msg, line, column) => throw AssetCompilationException(Some(sourceFile),
                msg,
                line,
                column)
            }.right.get

Thanks a lot in advance.

F.

@leodagdag
Copy link
Author

Duplicate wit the pull-request #3 I created, so I close it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant