diff --git a/.github/workflows/__zstd-bundle-streaming.yml b/.github/workflows/__zstd-bundle-streaming.yml index 8a143a2e86..6328bbeef3 100644 --- a/.github/workflows/__zstd-bundle-streaming.yml +++ b/.github/workflows/__zstd-bundle-streaming.yml @@ -59,7 +59,9 @@ jobs: const fs = require('fs'); const path = require('path'); const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL'); - fs.rmdirSync(codeqlPath, { recursive: true }); + if (codeqlPath !== undefined) { + fs.rmdirSync(codeqlPath, { recursive: true }); + } - id: init uses: ./../action/init with: diff --git a/.github/workflows/__zstd-bundle.yml b/.github/workflows/__zstd-bundle.yml index da8a554426..9f30368559 100644 --- a/.github/workflows/__zstd-bundle.yml +++ b/.github/workflows/__zstd-bundle.yml @@ -61,7 +61,9 @@ jobs: const fs = require('fs'); const path = require('path'); const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL'); - fs.rmdirSync(codeqlPath, { recursive: true }); + if (codeqlPath !== undefined) { + fs.rmdirSync(codeqlPath, { recursive: true }); + } - id: init uses: ./../action/init with: diff --git a/pr-checks/checks/zstd-bundle-streaming.yml b/pr-checks/checks/zstd-bundle-streaming.yml index 40937fa141..291f8d88bf 100644 --- a/pr-checks/checks/zstd-bundle-streaming.yml +++ b/pr-checks/checks/zstd-bundle-streaming.yml @@ -16,7 +16,9 @@ steps: const fs = require('fs'); const path = require('path'); const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL'); - fs.rmdirSync(codeqlPath, { recursive: true }); + if (codeqlPath !== undefined) { + fs.rmdirSync(codeqlPath, { recursive: true }); + } - id: init uses: ./../action/init with: diff --git a/pr-checks/checks/zstd-bundle.yml b/pr-checks/checks/zstd-bundle.yml index a751b18bcb..9350c39f6f 100644 --- a/pr-checks/checks/zstd-bundle.yml +++ b/pr-checks/checks/zstd-bundle.yml @@ -16,7 +16,9 @@ steps: const fs = require('fs'); const path = require('path'); const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL'); - fs.rmdirSync(codeqlPath, { recursive: true }); + if (codeqlPath !== undefined) { + fs.rmdirSync(codeqlPath, { recursive: true }); + } - id: init uses: ./../action/init with: