mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-12 07:59:02 +02:00
fix(bins): Windows-safe GIT_CEILING join; next-version probes the full default-base chain
GIT_CEILING_DIRECTORIES was joined with ':' — git on Windows splits on ';' and drive letters contain ':', silently disabling the #2144 second-layer defense there; now path.delimiter. next-version's default-base detection only tried origin/HEAD then 'main', diverging from the canonical 4-step chain diff-scope uses — origin/main and origin/master probes added, pinned by fixture repos.
This commit is contained in:
@@ -54,7 +54,7 @@ import {
|
||||
rmSync,
|
||||
realpathSync,
|
||||
} from "fs";
|
||||
import { join, basename, dirname } from "path";
|
||||
import { join, basename, dirname, delimiter } from "path";
|
||||
import { execFileSync, spawnSync, spawn, type ChildProcess } from "child_process";
|
||||
import { homedir } from "os";
|
||||
import { createHash } from "crypto";
|
||||
@@ -1443,8 +1443,10 @@ function runGbrainImport(
|
||||
}
|
||||
const baseEnv: NodeJS.ProcessEnv = {
|
||||
...process.env,
|
||||
// path.delimiter, not ':' — git splits this on ';' on Windows, and
|
||||
// drive-letter paths contain ':' themselves.
|
||||
GIT_CEILING_DIRECTORIES: process.env.GIT_CEILING_DIRECTORIES
|
||||
? `${ceiling}:${process.env.GIT_CEILING_DIRECTORIES}`
|
||||
? `${ceiling}${delimiter}${process.env.GIT_CEILING_DIRECTORIES}`
|
||||
: ceiling,
|
||||
};
|
||||
const child = spawnGbrainAsync(
|
||||
|
||||
Reference in New Issue
Block a user