mirror of
https://github.com/automazeio/ccpm.git
synced 2025-10-09 13:41:06 +03:00
revert: remove dirname -- flag for broader compatibility
Remove the '--' end-of-options flag from dirname command as it's not universally supported across all POSIX implementations. While '--' is good practice for handling filenames starting with dashes, dirname rarely encounters such edge cases in practice, and the compatibility issue is more pressing. Some older or minimal POSIX shells don't recognize '--' with dirname, causing the script to fail. Since we're already in a controlled loop walking up directory paths that come from pwd, the risk of dash-prefixed paths is negligible. Trade-off: Prioritizing compatibility over theoretical edge case protection.
This commit is contained in:
@@ -81,7 +81,7 @@ get_worktree_path() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
check_dir=$(dirname -- "${check_dir}")
|
||||
check_dir=$(dirname "${check_dir}")
|
||||
done
|
||||
|
||||
debug_log "No git repository found"
|
||||
|
||||
Reference in New Issue
Block a user