Parcourir la source

Teach --standard-json that it should target burrow

This is used by burrow deploy.

Signed-off-by: Sean <sean@mess.org>
Sean il y a 6 ans
Parent
commit
b1bfdecf87
1 fichiers modifiés avec 9 ajouts et 4 suppressions
  1. 9 4
      src/main.rs

+ 9 - 4
src/main.rs

@@ -111,10 +111,15 @@ fn main() {
     };
 
     let context = inkwell::context::Context::create();
-    let target = match matches.value_of("TARGET") {
-        Some("substrate") => resolver::Target::Substrate,
-        Some("burrow") => resolver::Target::Burrow,
-        _ => unreachable!()
+    let target = if matches.is_present("STD-JSON") {
+        // This type of output is used by burrow deploy
+        resolver::Target::Burrow
+    } else {
+        match matches.value_of("TARGET") {
+            Some("substrate") => resolver::Target::Substrate,
+            Some("burrow") => resolver::Target::Burrow,
+            _ => unreachable!()
+        }
     };
     let verbose = matches.is_present("VERBOSE");