Skip to content

Commit 96f135c

Browse files
committed
Print debug messages
1 parent 6a50b28 commit 96f135c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/test-installers.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ jobs:
9898
test: auto-update-from
9999

100100
runs-on: ${{ matrix.runs-on }}
101+
env:
102+
DEBUG: compass:smoketests:*
101103
steps:
102104
- name: Checkout
103105
uses: actions/checkout@v2

packages/compass-smoke-tests/src/downloads.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export async function downloadFile({
1919
targetFilename,
2020
clearCache,
2121
}: DownloadFileOptions): Promise<string> {
22+
debug('Fetching', { url });
2223
const response = await fetch(url);
2324

2425
assert(
@@ -40,7 +41,7 @@ export async function downloadFile({
4041
if (clearCache) {
4142
fs.rmSync(cacheDirectoryPath, { recursive: true, force: true });
4243
} else {
43-
debug('Skipped downloading', url, '(cache existed)');
44+
debug('Skipped downloading (cache existed)', { url });
4445
return outputPath;
4546
}
4647
}
@@ -51,11 +52,11 @@ export async function downloadFile({
5152

5253
// Write the response to file
5354
assert(response.body, 'Expected a response body');
54-
debug('Downloading', url);
55+
debug('Downloading', { url, outputPath });
5556
await stream.promises.pipeline(
5657
response.body,
5758
fs.createWriteStream(outputPath)
5859
);
59-
60+
debug('Download completed', { url, outputPath });
6061
return outputPath;
6162
}

0 commit comments

Comments
 (0)