Skip to content

Commit 6c4badd

Browse files
committed
Fix git fetches
1 parent c9e0d99 commit 6c4badd

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

lib/porcelain/fetch.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ async function clone({ dst, src, ref }: { dst: Path, src: URL, ref?: string }) {
4141
// ensure the parent dir exists
4242
dst.parent().mkdir('p')
4343

44-
const tmp = Path.mktemp({})
45-
4644
const args = [
4745
"clone",
4846
"--quiet",
@@ -53,18 +51,11 @@ async function clone({ dst, src, ref }: { dst: Path, src: URL, ref?: string }) {
5351
}
5452
args.push(
5553
src.toString(),
56-
tmp.string,
54+
dst.string,
5755
)
5856

59-
// Clone the specific ref to our temp dir
60-
const proc = new Deno.Command("git", {
61-
args,
62-
// `git` uses stderr for... non errors, and --quiet
63-
// doesn't touch them
64-
stderr: "null",
65-
})
66-
const status = await proc.spawn().status
67-
if (!status.success) {
57+
const {success} = await new Deno.Command("git", {args}).spawn().status
58+
if (!success) {
6859
throw new Error(`git failed to clone ${src} to ${dst}`)
6960
}
7061

projects/pyapp.com/1/package.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
distributable: null
1+
distributable:
2+
url: git+https://github.com/pkgxdev/brewkit
3+
ref: v{{version}}
24

35
versions:
46
- 1.0.0

0 commit comments

Comments
 (0)