Skip to content

Commit

Permalink
abs
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbhmr authored Nov 14, 2023
1 parent 57f9221 commit 59fde9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ const githubContext = {

function getNameEmailInput(
input: string,
options: { required: true },
options: { required: true }
): [string, string];
function getNameEmailInput(
input: string,
options?: { required?: boolean },
options?: { required?: boolean }
): [string | null, string | null];
function getNameEmailInput(
input: string,
options: { required?: boolean } = {},
options: { required?: boolean } = {}
) {
const { required = false } = options;
const githubActionsRe = /^\s*@?github[-_]?actions(?:\[bot\])?\s*$/;
Expand Down Expand Up @@ -53,7 +53,7 @@ const githubToken = core.getInput("github-token");
const githubServerURL = core.getInput("github-server-url");
const [userName, userEmail] = getNameEmailInput("user");
const safeDirectoryGlobs = core.getMultilineInput("safe-directory");
const safeDirectories = await glob(safeDirectoryGlobs);
const safeDirectories = await glob(safeDirectoryGlobs, { absolute: true });

if (userName && userEmail) {
await $({ stdio: "inherit" })`git config --global user.name ${userName}`;
Expand Down

0 comments on commit 59fde9a

Please sign in to comment.