Files
Mini-Nav/.envrc

20 lines
578 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
export DIRENV_WARN_TIMEOUT=20s
# 尝试加载 devenv 的 direnv 配置
if command -v devenv >/dev/null 2>&1; then
# 如果存在 devenv
eval "$(devenv direnvrc)"
# `use devenv` 支持和 `devenv shell` 相同的选项
# 示例use devenv --quiet --impure --option services.postgres.enable:bool true
use devenv
else
# 如果不存在 devenv则加载自己的 fallback 配置
echo "devenv not found, loading fallback configuration..."
export UV_PROJECT_ENVIRONMENT="/workspace/envs/mini-nav"
export MY_DEV_ENV=1
fi