Skip to content
This repository was archived by the owner on Oct 27, 2022. It is now read-only.

Commit a5d5f0e

Browse files
committed
more logging
1 parent e2e1353 commit a5d5f0e

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

lib/config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const parseList = (list, seperator) => list
1111
.map((e) => e.trim())
1212
.filter((e) => e.length > 0);
1313
exports.loadConfig = () => {
14-
return {
14+
const config = {
1515
version: versionnumber_1.default.fromString(core_1.getInput("version", { required: true })),
1616
platform: core_1.getInput("platform", { required: true }),
1717
packages: parseList(core_1.getInput("platform"), ","),
@@ -20,4 +20,6 @@ exports.loadConfig = () => {
2020
cacheMode: core_1.getInput("cache-mode"),
2121
clean: core_1.getInput("clean") === "true",
2222
};
23+
core_1.debug(`Using config: ${JSON.stringify(config, undefined, 2)}`);
24+
return config;
2325
};

lib/installer.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,10 @@ class Installer {
163163
yield this._downloader.addSource(new url_1.URL(src), false);
164164
// add packages
165165
core_1.debug(`Available modules: ${this._downloader.modules().join(", ")}`);
166+
core_1.debug(`Extra tools: ${this._platform.extraTools()}`);
166167
for (const pkg of this._platform.extraTools())
167168
this._downloader.addDownload(pkg, true);
169+
core_1.debug(`Config packages: ${this._config.packages}`);
168170
for (const pkg of this._config.packages)
169171
this._downloader.addDownload(pkg, true);
170172
// download and install

src/config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getInput } from "@actions/core";
1+
import { getInput, debug } from "@actions/core";
22
import VersionNumber from "./versionnumber";
33

44
export const enum CacheMode {
@@ -24,7 +24,7 @@ const parseList = (list: string, seperator: string): string[] =>
2424
.filter((e) => e.length > 0);
2525

2626
export const loadConfig = (): Config => {
27-
return {
27+
const config: Config = {
2828
version: VersionNumber.fromString(getInput("version", { required: true })),
2929
platform: getInput("platform", { required: true }),
3030
packages: parseList(getInput("platform"), ","),
@@ -33,4 +33,6 @@ export const loadConfig = (): Config => {
3333
cacheMode: getInput("cache-mode") as CacheMode,
3434
clean: getInput("clean") === "true",
3535
};
36+
debug(`Using config: ${JSON.stringify(config, undefined, 2)}`);
37+
return config;
3638
};

src/installer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,10 @@ export default class Installer {
197197

198198
// add packages
199199
debug(`Available modules: ${this._downloader.modules().join(", ")}`);
200+
debug(`Extra tools: ${this._platform.extraTools()}`);
200201
for (const pkg of this._platform.extraTools())
201202
this._downloader.addDownload(pkg, true);
203+
debug(`Config packages: ${this._config.packages}`);
202204
for (const pkg of this._config.packages)
203205
this._downloader.addDownload(pkg, true);
204206

0 commit comments

Comments
 (0)