From b31d94aa9f5db3e28b3bb9afea67431b36df2104 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sun, 26 May 2024 11:40:20 +0200 Subject: [PATCH] chore: remove unnecessary ?s --- src/getGitHubAuthToken.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/getGitHubAuthToken.ts b/src/getGitHubAuthToken.ts index 91eb635..96aecdc 100644 --- a/src/getGitHubAuthToken.ts +++ b/src/getGitHubAuthToken.ts @@ -11,7 +11,7 @@ export async function getGitHubAuthToken(): Promise { const exec = util.promisify(cp.exec); const token = await exec("gh auth token"); - if (token?.stdout) { + if (token.stdout) { return { succeeded: true, token: token.stdout }; } @@ -20,7 +20,7 @@ export async function getGitHubAuthToken(): Promise { return { error: (help.stderr && `Could not run \`gh\`: ${help.stderr}`) || - token?.stderr || + token.stderr || undefined, succeeded: false, };