1. 主页
  2. 文档
  3. Dart 2 中文文档
  4. 软件包
  5. Package reference
  6. Pub environment variables

Pub environment variables

Configuring pub environment variables

Environment variables allow you to customize pub to suit your needs.

PUB_CACHE
Some of pub’s dependencies are downloaded to the pub cache. By default, this directory is located under .pub-cache in your home directory (on Mac and Linux), or in %APPDATA%\Pub\Cache (on Windows). (The precise location of the cache may vary depending on the Windows version.) You can use the PUB_CACHE environment variable to specify another location. For more information, see The system package cache.
PUB_HOSTED_URL
Pub downloads dependencies from the Pub site. To specify the location of a particular mirror server, use the PUB_HOSTED_URL environment variable. For example:

这篇文章对您有用吗?
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址