fix(git): preserve env-backed simple-git behavior (re-submit of #323)#330
fix(git): preserve env-backed simple-git behavior (re-submit of #323)#330
Conversation
ユーザーのシェル環境に PAGER や EDITOR 等が設定されていると、 simple-git 3.36+ の block-unsafe-operations プラグインが `Use of "PAGER" is not permitted without enabling allowUnsafePager` を投げて、ワークスペースの削除・worktree 操作等がすべて失敗する。 upstream v1.5.5 の同梱 simple-git が 3.36.0 に上がった結果、 `PAGER=less` をログインシェルで設定しているユーザーで発生していた。 simple-git が弾く env キー (PAGER/EDITOR/GIT_* 系) は このアプリの git 操作では不要なので、env に詰める前に除外する。
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 19 minutes and 8 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
#323 を revert (#329) したため、同内容の PR を再作成したもの。レビューのやり直しを前提としており、問題なければ改めてマージする想定。
内容
シェル環境に `PAGER=less` など simple-git 3.36+ の block-unsafe-operations プラグインが弾く env が設定されていると、以下のエラーで desktop アプリ内の worktree / workspace 操作が失敗する:
```
Use of "PAGER" is not permitted without enabling allowUnsafePager
```
採用アプローチ
env を strip するのではなく、env に存在する unsafe キーに対応する `allowUnsafe` フラグだけを simple-git に渡す* 方式。
差分
元 #323 と同じ 2 コミット (b8d0c97 + ab78b34) を cherry-pick: