#!/usr/bin/env bash # _env.sh — shared CI mirror env. `source` this from other scripts. # Idempotent: only sets vars if not already provided by the environment. export GOPROXY="${GOPROXY:-https://goproxy.cn,direct}" export PUB_HOSTED_URL="${PUB_HOSTED_URL:-https://pub.flutter-io.cn}" export FLUTTER_STORAGE_BASE_URL="${FLUTTER_STORAGE_BASE_URL:-https://storage.flutter-io.cn}" # Ensure Homebrew tools are on PATH (macOS runners); harmless elsewhere. case ":${PATH}:" in *":/opt/homebrew/bin:"*) ;; *) export PATH="/opt/homebrew/bin:${PATH}" ;; esac