Merge pull request #9278 from wainersm/github_env_fix

tests: fix nounset error with $GITHUB_ENV
This commit is contained in:
Chelsea Mafrica 2024-03-14 16:39:13 -07:00 committed by GitHub
commit 2c50d3c393
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -213,7 +213,7 @@ function run_tests() {
# In case of running on Github workflow it needs to save the start time
# on the environment variables file so that the variable is exported on
# next workflow steps.
if [ -n "$GITHUB_ENV" ]; then
if [ -n "${GITHUB_ENV:-}" ]; then
start_time=$(date '+%Y-%m-%d %H:%M:%S')
export start_time
echo "start_time=${start_time}" >> "$GITHUB_ENV"

View File

@ -95,7 +95,7 @@ function run() {
enabling_hypervisor
if [ -n "$GITHUB_ENV" ]; then
if [ -n "${GITHUB_ENV:-}" ]; then
start_time=$(date '+%Y-%m-%d %H:%M:%S')
export start_time
echo "start_time=${start_time}" >> "$GITHUB_ENV"