mirror of
https://github.com/DeterminateSystems/magic-nix-cache-action.git
synced 2024-11-25 21:24:59 +03:00
Fix HTTP response stringify issue
This commit is contained in:
parent
edc61c4d5a
commit
a8b68ff5ba
6
dist/index.js
generated
vendored
6
dist/index.js
generated
vendored
@ -94996,15 +94996,13 @@ var MagicNixCacheAction = class {
|
||||
try {
|
||||
core.debug(`Indicating workflow start`);
|
||||
const hostAndPort = inputs_exports.getString("listen");
|
||||
const res = await this.client.post(
|
||||
`http://${hostAndPort}/api/workflow-start`
|
||||
);
|
||||
const res = await this.client.post(`http://${hostAndPort}/api/workflow-start`).json();
|
||||
if (res.statusCode !== 200) {
|
||||
this.failInStrictMode(
|
||||
`Failed to trigger workflow start hook. Expected status 200 but got ${res.statusCode}`
|
||||
);
|
||||
}
|
||||
core.debug(`back from post: ${JSON.stringify(res)}`);
|
||||
core.debug(`back from post: ${JSON.stringify(res.body)}`);
|
||||
} catch (e) {
|
||||
core.info(`Error marking the workflow as started:`);
|
||||
core.info((0,external_node_util_.inspect)(e));
|
||||
|
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@ -274,9 +274,9 @@ class MagicNixCacheAction {
|
||||
try {
|
||||
actionsCore.debug(`Indicating workflow start`);
|
||||
const hostAndPort = inputs.getString("listen");
|
||||
const res: Response<string> = await this.client.post(
|
||||
`http://${hostAndPort}/api/workflow-start`,
|
||||
);
|
||||
const res: Response<string> = await this.client
|
||||
.post(`http://${hostAndPort}/api/workflow-start`)
|
||||
.json();
|
||||
|
||||
if (res.statusCode !== 200) {
|
||||
this.failInStrictMode(
|
||||
@ -284,7 +284,7 @@ class MagicNixCacheAction {
|
||||
);
|
||||
}
|
||||
|
||||
actionsCore.debug(`back from post: ${JSON.stringify(res)}`);
|
||||
actionsCore.debug(`back from post: ${JSON.stringify(res.body)}`);
|
||||
} catch (e) {
|
||||
actionsCore.info(`Error marking the workflow as started:`);
|
||||
actionsCore.info(inspect(e));
|
||||
|
Loading…
Reference in New Issue
Block a user