Skip to content

Commit

Permalink
fix: replace sed with awk
Browse files Browse the repository at this point in the history
  • Loading branch information
necusjz committed Jan 28, 2025
1 parent b045188 commit 06a2b48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .githooks/pre-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ YELLOW="\033[0;33m"
NC="\033[0m" # no color

# Get the list of changed files
ChangedFiles=$(git status --porcelain | sed -E 's/^\s*\S+\s+//')
ChangedFiles=$(git status --porcelain | awk '{print $2}')

# Extract modified modules
Modules=$(echo "$ChangedFiles" |
Expand All @@ -22,7 +22,7 @@ GitRoot=$(git rev-parse --show-toplevel)

# Iterate through the modules
for Module in $Modules; do
echo -e "${YELLOW}Running: aaz-dev command-model verify -a $GitRoot -t $Module${NC}" # For logging
echo "${YELLOW}Running: aaz-dev command-model verify -a $GitRoot -t $Module${NC}" # For logging
aaz-dev command-model verify -a "$GitRoot" -t "$Module"
if [[ $? -ne 0 ]]; then
exit 1
Expand Down

0 comments on commit 06a2b48

Please sign in to comment.