Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我现在正在学习 Percy 和 Cypress。我仍在本地工作,没有 CI。由于我有多个项目,因此每次在项目之间切换时,我都必须手动更改 Percy 令牌(在终端中使用 export PERCY_TOKEN=myToken)。我可以通过在文件中指定令牌来避免这种情况吗?如果有,是哪一个?
假设您使用的是 macOS 或 Linux,如果您有bashrc或zshrc文件,您应该能够将其导出PERCY_TOKEN为该文件中的变量。
PERCY_TOKEN
export PERCY_TOKEN=myToken
保存.*rc文件后,您将需要重新启动终端,或者只需获取更新的文件。
.*rc
source ~/path/to/.*rc