From aa5de0f2908713f8b63aa1f4d9724f0d622652d7 Mon Sep 17 00:00:00 2001 From: David Craven Date: Sat, 18 Jan 2020 20:35:51 +0100 Subject: [PATCH] Update to latest cargo-flutter. --- .github/workflows/ci.yml | 6 ++++++ src/main.rs | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3071e2f..684c1e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,6 +101,12 @@ jobs: - name: Checkout sources uses: actions/checkout@v1 + - name: Cache cargo folder + uses: actions/cache@v1 + with: + path: ~/.cargo + key: lint-cargo + - name: Install rust toolchain uses: hecrj/setup-rust-action@v1 with: diff --git a/src/main.rs b/src/main.rs index 0c08bc9..ce3b75a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,7 +8,12 @@ fn main() { let assets_dir = std::env::var("FLUTTER_ASSET_DIR").expect("FLUTTER_ASSET_DIR"); - let mut args = Vec::with_capacity(1); + let mut args = Vec::with_capacity(3); + + if let Ok(observatory_port) = std::env::var("DART_OBSERVATORY_PORT") { + args.push("--disable-service-auth-codes".to_string()); + args.push(format!("--observatory-port={}", observatory_port)); + } if let Ok(snapshot) = std::env::var("FLUTTER_AOT_SNAPSHOT") { if Path::new(&snapshot).exists() {