From 69ed4cdee3da0bb84439a255e42554619837b16e Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Sun, 10 Sep 2023 21:33:59 +0800 Subject: [PATCH] Check flutter variable too when getsrc --- README.md | 2 +- chsrc.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1d06b32..88b2973 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ chsrc set go chsrc set rust 或 chsrc set cargo / crate chsrc set java 或 chsrc set maven / mvn / gradle chsrc set clojure 或 chsrc set clojars -chsrc set dart 或 chsrc set pub +chsrc set dart 或 chsrc set pub / flutter # 即同时为flutter换源 chsrc set haskell 或 chsrc set hackage/cabal/stack # 同时会为 bioconductor 换源 diff --git a/chsrc.c b/chsrc.c index 6c44674..265a348 100644 --- a/chsrc.c +++ b/chsrc.c @@ -757,17 +757,16 @@ pl_clojure_setsrc(char* option) - void pl_dart_getsrc(char* option) { char* cmd = NULL; if (xy_on_windows) { - cmd = "set PUB_HOSTED_URL"; + cmd = "set PUB_HOSTED_URL & set FLUTTER_STORAGE_BASE_URL"; chsrc_logcmd(cmd); system(cmd); } else { - cmd = "echo $PUB_HOSTED_URL"; + cmd = "echo $PUB_HOSTED_URL; echo $FLUTTER_STORAGE_BASE_URL"; chsrc_logcmd(cmd); system(cmd); } @@ -1684,7 +1683,7 @@ static const char *pl_rust [] = {"rust", "cargo", "crate", "crates", NULL, targetinfo(&pl_rust_target)}, *pl_java [] = {"java", "maven", "gradle", NULL, targetinfo(&pl_java_target)}, *pl_clojure[] ={"clojure","clojars","leiningen", "lein", NULL, targetinfo(&pl_clojure_target)}, -*pl_dart [] = {"dart", "pub", NULL, targetinfo(&pl_dart_target)}, +*pl_dart [] = {"dart", "pub", "flutter", NULL, targetinfo(&pl_dart_target)}, *pl_dotnet[] = {"nuget", "net", ".net", "dotnet", NULL, targetinfo(&pl_dotnet_target)}, *pl_haskell[] ={"haskell", "cabal", "stack", "hackage", NULL, targetinfo(&pl_haskell_target)}, *pl_r [] = {"r", "cran", NULL, targetinfo(&pl_r_target)},