fix: use realpath consistently for init/dispose and drop unnecessary fsmonitor flag on git show
parent
59af5bd0ef
commit
73a9c26fe9
|
|
@ -550,11 +550,7 @@ export namespace File {
|
||||||
.text()
|
.text()
|
||||||
}
|
}
|
||||||
if (diff.trim()) {
|
if (diff.trim()) {
|
||||||
const original = await $`git -c core.fsmonitor=false show HEAD:${file}`
|
const original = await $`git show HEAD:${file}`.cwd(Instance.directory).quiet().nothrow().text()
|
||||||
.cwd(Instance.directory)
|
|
||||||
.quiet()
|
|
||||||
.nothrow()
|
|
||||||
.text()
|
|
||||||
const patch = structuredPatch(file, file, original, content, "old", "new", {
|
const patch = structuredPatch(file, file, original, content, "old", "new", {
|
||||||
context: Infinity,
|
context: Infinity,
|
||||||
ignoreWhitespace: true,
|
ignoreWhitespace: true,
|
||||||
|
|
|
||||||
|
|
@ -53,8 +53,8 @@ export async function tmpdir<T>(options?: TmpDirOptions<T>) {
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
const extra = await options?.init?.(dirpath)
|
|
||||||
const realpath = sanitizePath(await fs.realpath(dirpath))
|
const realpath = sanitizePath(await fs.realpath(dirpath))
|
||||||
|
const extra = await options?.init?.(realpath)
|
||||||
const result = {
|
const result = {
|
||||||
[Symbol.asyncDispose]: async () => {
|
[Symbol.asyncDispose]: async () => {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue