From 02f3d58995796ecdb3b48917dddf2d87aa1e1c7c Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Thu, 30 Sep 2021 16:07:11 -0400 Subject: [PATCH] Clean up a few typescript warnings (#25) --- README.md | 8 ++++---- src/main.ts | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4ee7df5..8dd73f7 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ jobs: # Add "id-token" with the intended permissions. permissions: - contents: read + contents: 'read' id-token: 'write' steps: @@ -157,7 +157,7 @@ jobs: # Add "id-token" with the intended permissions. permissions: - contents: read + contents: 'read' id-token: 'write' steps: @@ -203,7 +203,7 @@ jobs: # Add "id-token" with the intended permissions. permissions: - contents: read + contents: 'read' id-token: 'write' steps: @@ -238,7 +238,7 @@ jobs: # Add "id-token" with the intended permissions. permissions: - contents: read + contents: 'read' id-token: 'write' steps: diff --git a/src/main.ts b/src/main.ts index 9fd09f3..d4ac54b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -46,7 +46,10 @@ async function run(): Promise { // fails, which means continue-on-error actions will still have the file // available. if (createCredentialsFile) { - const runnerTempDir = process.env.RUNNER_TEMP!; + const runnerTempDir = process.env.RUNNER_TEMP; + if (!runnerTempDir) { + throw new Error('$RUNNER_TEMP is not set'); + } // Extract the request token and request URL from the environment. These // are only set when an id-token is requested and the submitter has