mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-02 23:14:33 +01:00
fix: pre-landing review fixes
Drop the gstack-session-update temp-path change: with MSYS_NO_PATHCONV exported its hook check still runs Bun, which cannot start, so the update stays held either way and the change had no user-visible effect. The doctor warning and docs/troubleshooting.md#msys-no-pathconv cover that case. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
0c9eb8048c
commit
355f7e86b3
3 files changed
+7
-9
No files matched your search
@@ -131,12 +131,9 @@ hook_report() {
|
||||
hook_incoming_hold() {
|
||||
_hc_dir=$(mktemp -d "${TMPDIR:-/tmp}/gstack-session-hooks-XXXXXX" 2>/dev/null) \
|
||||
|| { echo "hook-check-unavailable: cannot create a temp directory under ${TMPDIR:-/tmp}"; return 0; }
|
||||
# With MSYS path conversion off, Git for Windows cannot open /tmp/... (#3468).
|
||||
_hc_git=$_hc_dir
|
||||
[ -z "${MSYS_NO_PATHCONV:-}" ] || _hc_git=$(gstack_path_native "$_hc_dir")
|
||||
_hc_out="" _hc_why=""
|
||||
if ! ( export GIT_INDEX_FILE="$_hc_git.index"
|
||||
git -C "$GSTACK_DIR" read-tree "$1" && git -C "$GSTACK_DIR" -c core.symlinks=false checkout-index -a --prefix="$_hc_git/" ) 2>"$_hc_dir.err"; then
|
||||
if ! ( export GIT_INDEX_FILE="$_hc_dir.index"
|
||||
git -C "$GSTACK_DIR" read-tree "$1" && git -C "$GSTACK_DIR" -c core.symlinks=false checkout-index -a --prefix="$_hc_dir/" ) 2>"$_hc_dir.err"; then
|
||||
_hc_why="cannot extract the incoming revision: $(ff_flatten "$(head -c 200 "$_hc_dir.err" 2>/dev/null)" 200)"
|
||||
elif [ -f "$_hc_dir/bin/gstack-hook-check" ] && hook_report "$_hc_dir/bin/gstack-hook-check" "$_hc_dir"; then
|
||||
_hc_out=$_hr_out
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
**Windows custom-root installs keep their own paths, and gstack's git helpers work with `MSYS_NO_PATHCONV=1` exported.** Git Bash hands native Bun a setup install root like `/c/Users/you/isolated/...` as `C:/Users/you/isolated/...`, and the renderer refused any root that did not start with `/`. Setup warned and the isolated install kept the default-install paths (#3498, reported by DanCanadian). With `MSYS_NO_PATHCONV=1` exported (common for docker), Git for Windows received raw `/tmp/...` temp index paths it cannot open, so `gstack-wtree` and every review record built on it failed. `gstack-ff-update` and the session updater's hook check failed the same way (#3468, reported by Simba3696).
|
||||
**Windows custom-root installs keep their own paths, and gstack's git helpers work with `MSYS_NO_PATHCONV=1` exported.** Git Bash hands native Bun a setup install root like `/c/Users/you/isolated/...` as `C:/Users/you/isolated/...`, and the renderer refused any root that did not start with `/`. Setup warned and the isolated install kept the default-install paths (#3498, reported by DanCanadian). With `MSYS_NO_PATHCONV=1` exported (common for docker), Git for Windows received raw `/tmp/...` temp index paths it cannot open, so `gstack-wtree` and every review record built on it failed. `gstack-ff-update` failed the same way (#3468, reported by Simba3696).
|
||||
|
||||
### Fixed
|
||||
- **`scripts/gen-skill-docs.ts --install-root`** accepts a drive-letter root and renders it in the `/c/...` spelling setup checks. A root with characters outside the plain set still refuses.
|
||||
- **`setup`** converts a drive-form root with `cygpath -u` before its plain-path guard, so the guard, the render and setup's own post-render check agree.
|
||||
- **`gstack-wtree`, `gstack-ff-update` and `gstack-session-update`** hand Git their temp index paths in Windows form.
|
||||
- **`gstack-wtree` and `gstack-ff-update`** hand Git their temp index paths in Windows form.
|
||||
- **`gstack-doctor`** warns on the `windows bash` row when `MSYS_NO_PATHCONV` is exported. Bun-based gstack commands start with `--config=/dev/null`, and with path conversion off native Bun cannot open `/dev/null`. No spelling works for both Bun on Windows and Linux/macOS (checked on windows-latest), so the fix is to set the variable per command. See docs/troubleshooting.md#msys-no-pathconv.
|
||||
|
||||
### Tests
|
||||
|
||||
@@ -2163,8 +2163,9 @@ or in Windows PowerShell:
|
||||
`/dev/null` and `/tmp/...` into paths native Windows programs can open. With
|
||||
`MSYS_NO_PATHCONV=1` exported, it passes them through unchanged: native Bun
|
||||
cannot open `/dev/null`, so every Bun-based gstack command fails before it
|
||||
starts. `gstack-wtree`, `gstack-ff-update` and the session updater hand Git
|
||||
their temp files in Windows form, so they work either way (#3468).
|
||||
starts, and the session updater holds new releases because its hook check runs
|
||||
Bun. `gstack-wtree` and `gstack-ff-update` hand Git their temp files in Windows
|
||||
form, so they work either way (#3468).
|
||||
|
||||
**Fix.** Don't export `MSYS_NO_PATHCONV`. Set it only on the command that needs
|
||||
it, for example `MSYS_NO_PATHCONV=1 docker run -v /c/src:/src ...`, or remove
|
||||
|
||||
Reference in new issue
Block a user