Skip to content

createLockFileForStandardQuery always creates temp lock because packPacklist doesn't return lock files #4471

Description

@witwait

Describe the bug
In src/local-queries/standard-queries.ts , createLockFileForStandardQuery tries to detect whether a pack already has a codeql-pack.lock.yml by checking the output of cli.packPacklist():

const packContents = await cli.packPacklist(queryPath, false);
const lockFilePath = packContents.find((p) =>
    QLPACK_LOCK_FILENAMES.includes(basename(p)),
  );

However, codeql pack packlist doesn't return codeql-pack.lock.yml. This means lockFilePath is always undefined, so the check for an existing lock file can never succeed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    VSCodebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions