Ignore grep error if .env doesn't exist (#82)
.env file is optional. If it doesn't exist, the current script outputs "grep: .env: No such file or directory".
This commit is contained in:
parent
7f95c594c0
commit
0a531f732b
|
@ -25,6 +25,8 @@ npm run build --workspaces
|
||||||
|
|
||||||
# also build container image if GEMINI_CODE_SANDBOX is set (can be in .env file)
|
# also build container image if GEMINI_CODE_SANDBOX is set (can be in .env file)
|
||||||
# skip (-s) npm install + build since we did that above
|
# skip (-s) npm install + build since we did that above
|
||||||
if [[ "${GEMINI_CODE_SANDBOX:-}" =~ ^(1|true)$ ]] || grep -qiE '^GEMINI_CODE_SANDBOX *= *(1|true)' .env; then
|
if [[ "${GEMINI_CODE_SANDBOX:-}" =~ ^(1|true)$ ]]; then
|
||||||
|
scripts/build_sandbox.sh -s
|
||||||
|
elif [ -f .env ] && grep -qiE '^GEMINI_CODE_SANDBOX *= *(1|true)' .env; then
|
||||||
scripts/build_sandbox.sh -s
|
scripts/build_sandbox.sh -s
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue