Check flutter variable too when getsrc

This commit is contained in:
Aoran Zeng 2023-09-10 21:33:59 +08:00
parent ddec0a611f
commit 69ed4cdee3
2 changed files with 4 additions and 5 deletions

View File

@ -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 换源

View File

@ -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)},