-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Closed
Labels
bugConfirmed bugs or reports that are very likely to be bugsConfirmed bugs or reports that are very likely to be bugs
Description
The problem
I tried to run pre-commit hooks below.
#!/bin/sh
# コミット対象の編集された.xlsxファイルを取得
xlsx_files=$(git diff --cached --name-only --diff-filter=ACM | grep '\.xlsx$')
# .xlsxファイルがある場合はCheckSheetConflictを実行
if [ -n "$xlsx_files" ]; then
echo "Checking sheet conflicts for: $xlsx_files"
# publishディレクトリのパスを取得
repo_root=$(git rev-parse --show-toplevel)
publish_dir="$repo_root/hoge/publish/mac"
# Check if publish directory exists
if [ ! -d "$publish_dir" ]; then
echo "Error: Publish directory not found: $publish_dir"
exit 1
fi
executable="$publish_dir/hoge"
# CheckSheetConflictを実行
"$executable" CheckSheetConflict $xlsx_files
# 実行結果を確認
if [ $? -ne 0 ]; then
echo "CheckSheetConflict failed. Commit aborted."
exit 1
fi
echo "CheckSheetConflict passed."
fi
exit 0When I try to commit by CLI, this hook run successfully, but by desktop, this hooks didn't run and commit passed in any situation.
"executable" contains google oauth, and googlr api access.
Release version
3.5.4
Operating system
macOS
Steps to reproduce the behavior
No response
Log files
No response
Screenshots
No response
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed bugs or reports that are very likely to be bugsConfirmed bugs or reports that are very likely to be bugs
Type
Fields
Give feedbackNo fields configured for issues without a type.