Skip to content

Commit e95694d

Browse files
authored
fix(Find): When auth_context input is omitted, use a parseable fallback to avoid SyntaxError (#1720)
Fixes the following error (e.g. in https://github.com/github-community-projects/continuous-ai-for-accessibility-scanner-demo/actions/runs/18316400478/job/52157716701): ``` SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at Module.default (file:///home/runner/work/continuous-ai-for-accessibility-scanner-demo/continuous-ai-for-accessibility-scanner-demo/.github/actions/find/dist/index.js:8:35) ``` This is basically the same issue I caught in github-community-projects/continuous-ai-for-accessibility-scanner#1707 (comment), only I didn’t catch it here (until now).
2 parents 2b4b97b + 3956c13 commit e95694d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/actions/find/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default async function () {
88
const urls = core.getMultilineInput("urls", { required: true });
99
core.debug(`Input: 'urls: ${JSON.stringify(urls)}'`);
1010
const authContextInput: AuthContextInput = JSON.parse(
11-
core.getInput("auth_context", { required: false }) ?? "{}"
11+
core.getInput("auth_context", { required: false }) || "{}"
1212
);
1313
const authContext = new AuthContext(authContextInput);
1414

0 commit comments

Comments
 (0)