Skip to content

Commit 546358c

Browse files
committed
Pass HTTP_PROXY vars to git
Closes pkgxdev/pkgx#811
1 parent 29a6186 commit 546358c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hooks/useSync.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ export interface RunOptions {
7676

7777
async function run(opts: RunOptions) {
7878
const cmd = opts.cmd.map(x => `${x}`)
79-
const proc = Deno.run({ ...opts, cmd, stdout: 'null', clearEnv: true })
79+
const env = (({ HTTP_PROXY, HTTPS_PROXY }) => ({ HTTP_PROXY, HTTPS_PROXY }))(Deno.env.toObject())
80+
const proc = Deno.run({ ...opts, cmd, stdout: 'null', clearEnv: true, env })
8081
try {
8182
const exit = await proc.status()
8283
if (!exit.success) throw new Error(`run.exit(${exit.code})`)

0 commit comments

Comments
 (0)