Skip to content

Commit

Permalink
remove duplicate log from scipts
Browse files Browse the repository at this point in the history
  • Loading branch information
anurag4DSB committed Dec 22, 2024
1 parent b3ebaaf commit 042a729
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .github/scripts/cleanup_cosi_resources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ error_handler() {
trap 'error_handler' ERR

log_and_run() {
echo "Running: $*" | tee -a "$LOG_FILE"
"$@" | tee -a "$LOG_FILE"
"$@" 2>&1 | tee -a "$LOG_FILE"
}

log_and_run echo "Removing COSI driver manifests and namespace..."
Expand Down
3 changes: 1 addition & 2 deletions .github/scripts/e2e_tests_greenfield_use_case.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ trap 'error_handler' ERR

# Log command execution to the log file for debugging
log_and_run() {
echo "Running: $*" | tee -a "$LOG_FILE"
"$@" | tee -a "$LOG_FILE"
"$@" 2>&1 | tee -a "$LOG_FILE"
}

# Step 1: Create Account in Vault
Expand Down
3 changes: 1 addition & 2 deletions .github/scripts/setup_cosi_resources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ trap 'error_handler' ERR

# Log command execution to the log file for debugging
log_and_run() {
echo "Running: $*" | tee -a "$LOG_FILE"
if ! "$@" | tee -a "$LOG_FILE"; then
if ! "$@" 2>&1 | tee -a "$LOG_FILE"; then
echo "Error: Command failed - $*" | tee -a "$LOG_FILE"
exit 1
fi
Expand Down

0 comments on commit 042a729

Please sign in to comment.