diff options
author | Artur Signell <artur@vaadin.com> | 2012-11-20 08:53:55 +0000 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2012-11-20 08:53:55 +0000 |
commit | ca8ab1101bc68c5fc634a8001dbd7652dbe2c553 (patch) | |
tree | 08b2efb43109686eb3db76c9b7fd44563f01a1be | |
parent | 512b541b3edb1dbc919dd1fa757965a766c603ad (diff) | |
parent | ee80691d45e1333d233fb675df89ac0260218124 (diff) | |
download | vaadin-framework-ca8ab1101bc68c5fc634a8001dbd7652dbe2c553.tar.gz vaadin-framework-ca8ab1101bc68c5fc634a8001dbd7652dbe2c553.zip |
Merge "SassCompiler finds input in a better way, fixes #10299"
-rw-r--r-- | theme-compiler/src/com/vaadin/sass/SassCompiler.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/theme-compiler/src/com/vaadin/sass/SassCompiler.java b/theme-compiler/src/com/vaadin/sass/SassCompiler.java index e6ac31b865..07d6eb01f1 100644 --- a/theme-compiler/src/com/vaadin/sass/SassCompiler.java +++ b/theme-compiler/src/com/vaadin/sass/SassCompiler.java @@ -25,14 +25,20 @@ public class SassCompiler { public static void main(String[] args) throws Exception { String input = null; String output = null; - if (args.length == 0) { + if (args.length < 1 || args.length > 2) { System.out .println("usage: SassCompile <scss file to compile> <css file to write>"); return; - } else if (args.length == 1) { - input = args[0]; - } else { - input = args[0]; + } + + File in = new File(args[0]); + if (!in.canRead()) { + System.err.println(in.getCanonicalPath() + " could not be read!"); + return; + } + input = in.getCanonicalPath(); + + if (args.length == 2) { output = args[1]; } |