Permalink
Browse files

[fix] bslregister: gives a warning if the js validator is not found (…

…instead of an error)
  • Loading branch information...
OpaOnWindowsNow committed Nov 2, 2011
1 parent 41273b9 commit 8838d96c47bac6d42b84c3889a18e11b9d627120
Showing with 5 additions and 2 deletions.
  1. +5 −2 libbsl/bslRegisterLib.ml
View
@@ -1044,6 +1044,8 @@ let finalize s =
finalized_t
+let command_not_found = 127
+
let js_validator finalized_t =
let name = finalized_t.f_options.BI.basename in
match finalized_t.f_options.BI.js_validator with
@@ -1063,8 +1065,9 @@ let js_validator finalized_t =
Printf.printf "%s\n" command;
let r = Sys.command command in
if r<>0 && not(finalized_t.f_options.BI.unsafe_js) then (
- Printf.printf "Failure(%d) %s\n" r command;
- exit r
+ if r = command_not_found
+ then warning "%s not found. Cannot validate js part of the plugin. Please install it or deactivate validation (use --help)" executable
+ else OManager.error "code %d:%s: fail to validate js part of the plugin\n" r command
) else ()
| _ -> ()
;;

0 comments on commit 8838d96

Please sign in to comment.