From fd11de3ccacf39d225e7236fdb0d08d5f2c5c9b7 Mon Sep 17 00:00:00 2001 From: Johnny Winn Date: Mon, 27 Jul 2026 13:16:39 -0600 Subject: [PATCH 1/2] fix: pg:backups:download respects HTTPS_PROXY env var Route backup download requests through the proxy configured in https_proxy / HTTPS_PROXY environment variables using the already- declared https-proxy-agent dependency, matching the pattern used in src/lib/run/log-displayer.ts. Fixes #1531 (W-23597944) Co-Authored-By: Claude Sonnet 4.6 (1M context) --- src/lib/pg/download.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/pg/download.ts b/src/lib/pg/download.ts index 0babc13c08..ba5dc21c59 100644 --- a/src/lib/pg/download.ts +++ b/src/lib/pg/download.ts @@ -2,6 +2,7 @@ import cliProgress from 'cli-progress' import fs from 'fs-extra' import https from 'node:https' import Path from 'node:path' +import {HttpsProxyAgent} from 'https-proxy-agent' type downloadOptions = { progress: boolean @@ -30,7 +31,9 @@ export default function download(url: string, path: string, opts: downloadOption return new Promise((resolve, reject) => { fs.mkdirSync(Path.dirname(path), {recursive: true}) const file = fs.createWriteStream(path) - https.get(url, (rsp: any) => { + const proxy = process.env.https_proxy || process.env.HTTPS_PROXY + const options: https.RequestOptions = proxy ? {agent: new HttpsProxyAgent(proxy)} : {} + https.get(url, options, (rsp: any) => { if (tty && opts.progress) showProgress(rsp) rsp.pipe(file) .on('error', reject) From fc27307964ad418ca0d3a82d7dfc47607f5985e1 Mon Sep 17 00:00:00 2001 From: Johnny Winn Date: Mon, 27 Jul 2026 13:20:54 -0600 Subject: [PATCH 2/2] fix: sort imports to satisfy perfectionist/sort-imports linter --- src/lib/pg/download.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/pg/download.ts b/src/lib/pg/download.ts index ba5dc21c59..91652b0fba 100644 --- a/src/lib/pg/download.ts +++ b/src/lib/pg/download.ts @@ -1,8 +1,8 @@ import cliProgress from 'cli-progress' import fs from 'fs-extra' +import {HttpsProxyAgent} from 'https-proxy-agent' import https from 'node:https' import Path from 'node:path' -import {HttpsProxyAgent} from 'https-proxy-agent' type downloadOptions = { progress: boolean