Skip to content

Commit

Permalink
add more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
boyum committed Jan 7, 2022
1 parent ce22ce1 commit ee0be78
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
14 changes: 12 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { create as createArtifactClient } from "@actions/artifact";
import { debug, getInput, setFailed, setOutput } from "@actions/core";
import { info, debug, getInput, setFailed, setOutput } from "@actions/core";
import { exec } from "@actions/exec";
import { context } from "@actions/github";
import { mkdirP } from "@actions/io";
Expand Down Expand Up @@ -144,13 +144,14 @@ async function getLibraryContents(
projectName: string,
): Promise<Library | null> {
debug("Fetching library contents");
debug(
info(`Contents in root: ${await fs.promises.readdir(rootDir)}`);
info(
`Contents in root/project: ${await fs.promises.readdir(
path.join(rootDir, projectName),
)}`,
);

const libraryPath = `${rootDir}/${projectName}/library.json`;
const libraryPath = path.join(rootDir, projectName, "library.json");
const libraryExists = fs.existsSync(libraryPath);
if (!libraryExists) {
setFailed(`Could not find \`${libraryPath}\`.`);
Expand Down

0 comments on commit ee0be78

Please sign in to comment.