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()
|
||||
}
|
||||
if (diff.trim()) {
|
||||
const original = await $`git -c core.fsmonitor=false show HEAD:${file}`
|
||||
.cwd(Instance.directory)
|
||||
.quiet()
|
||||
.nothrow()
|
||||
.text()
|
||||
const original = await $`git show HEAD:${file}`.cwd(Instance.directory).quiet().nothrow().text()
|
||||
const patch = structuredPatch(file, file, original, content, "old", "new", {
|
||||
context: Infinity,
|
||||
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 extra = await options?.init?.(realpath)
|
||||
const result = {
|
||||
[Symbol.asyncDispose]: async () => {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue