Skip to content

Commit

Permalink
Address PR comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardopirovano committed Jun 28, 2021
1 parent 8f4c2c7 commit a7dac5c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -830,21 +830,21 @@ jobs:
runner/dist/codeql-runner-linux upload --sarif-file src/testdata/empty-sarif.sarif --repository $GITHUB_REPOSITORY --commit $GITHUB_SHA --ref $GITHUB_REF --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
multi-language-repo_test-local-codeql:
needs: [check-js, check-node-modules]
needs: [check-js, check-node-modules, check-codeql-versions]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Move codeql-action
run: |
wget ${{ fromJson(needs.check-codeql-versions.outputs.nightly-url) }}
wget ${{ needs.check-codeql-versions.outputs.nightly-url }}
mkdir ../action
mv * .github ../action/
mv ../action/tests/multi-language-repo/{*,.github} .
mv ../action/.github/workflows .github
- uses: ./../action/init
with:
tools: "file://../action/codeql-bundle.tar.gz"
tools: ../action/codeql-bundle.tar.gz
- name: Build code
run: ./build.sh
- uses: ./../action/analyze
17 changes: 8 additions & 9 deletions lib/codeql.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/codeql.js.map

Large diffs are not rendered by default.

21 changes: 8 additions & 13 deletions src/codeql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,23 +312,18 @@ export async function setupCodeQL(
logger: Logger
): Promise<{ codeql: CodeQL; toolsVersion: string }> {
try {
// We use the special value of 'latest' to prioritize the version in the
// defaults over any pinned cached version.
const forceLatest = codeqlURL === "latest";
if (forceLatest) {
codeqlURL = undefined;
}
let codeqlFolder: string;
let codeqlURLVersion: string;
if (codeqlURL?.startsWith("file://")) {
codeqlFolder = await toolcache.extractTar(
codeqlURL.substr(7),
tempDir,
logger
);
if (codeqlURL && !codeqlURL.startsWith("http")) {
codeqlFolder = await toolcache.extractTar(codeqlURL, tempDir, logger);
codeqlURLVersion = "local";
} else {
// We use the special value of 'latest' to prioritize the version in the
// defaults over any pinned cached version.
const forceLatest = codeqlURL === "latest";
if (forceLatest) {
codeqlURL = undefined;
}

codeqlURLVersion = getCodeQLURLVersion(
codeqlURL || `/${CODEQL_BUNDLE_VERSION}/`
);
Expand Down

0 comments on commit a7dac5c

Please sign in to comment.