Skip to content

Commit 82a0300

Browse files
committed
Add debugging statements
1 parent f0ab510 commit 82a0300

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

action.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ inputs:
99
description: 'The path to the directory containing the environment files to upload. Defaults to Actions working directory.'
1010
required: false
1111
default: '.'
12-
filePattern:
13-
description: 'The file name pattern for environment files to upload'
14-
required: false
15-
default: 'environment.yaml'
1612
runs:
1713
using: 'node16'
1814
main: 'dist/index.js'

componentDetection.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ export default class ComponentDetection {
2929
// Get the latest release from the component-detection repo, download the tarball, and extract it
3030
private static async downloadLatestRelease() {
3131
try {
32+
core.debug("Downloading latest release");
3233
const downloadURL = await this.getLatestReleaseURL();
3334
const blob = await (await fetch(new URL(downloadURL))).blob();
3435
const arrayBuffer = await blob.arrayBuffer();
3536
const buffer = Buffer.from(arrayBuffer);
3637

3738
// Write the blob to a file
39+
core.debug("Writing binary to file");
3840
await fs.writeFile(this.componentDetectionPath, buffer, {mode: 0o777, flag: 'w'},
3941
(err: any) => {
4042
if (err) {
@@ -48,6 +50,7 @@ export default class ComponentDetection {
4850

4951
// Run the component-detection CLI on the path specified
5052
private static async runComponentDetection(path: string) {
53+
core.info("Running component-detection");
5154
try {
5255
await exec.exec(`${this.componentDetectionPath} scan --SourceDirectory ${path} --ManifestFile ${this.outputPath}`);
5356
} catch (error: any) {
@@ -56,7 +59,7 @@ export default class ComponentDetection {
5659
}
5760

5861
private static async getManifestsFromResults(): Promise<Manifest[]| undefined> {
59-
62+
core.info("Getting manifests from results");
6063
try {
6164
// Parse the result file and add the packages to the package cache
6265
const packageCache = new PackageCache();
@@ -85,6 +88,7 @@ export default class ComponentDetection {
8588
}
8689
});
8790
});
91+
core.debug(JSON.stringify(packages));
8892

8993
// Create manifests
9094
const manifests: Array<Manifest> = [];

dist/index.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)