Add 'source-root' input to init action
This input is exposed in the CodeQL CLI as the flag --source-root, allowing
users of the CLI to set --source-root different from --working-dir. However,
in codeql-action, these two paths are conflated and it poses problems for
users with complicated build environments, in which a source root may be
a child of the working directory.
Most users should not notice this, as the default value is
${{ github.workspace }}, as it is implied now (`path.resolve()`).
This commit is contained in:
parent
c357ca73e4
commit
42babdf2c1
10 changed files with 22 additions and 14 deletions
3
lib/init.js
generated
3
lib/init.js
generated
|
|
@ -32,8 +32,7 @@ async function initConfig(languagesInput, queriesInput, packsInput, configFile,
|
|||
return config;
|
||||
}
|
||||
exports.initConfig = initConfig;
|
||||
async function runInit(codeql, config) {
|
||||
const sourceRoot = path.resolve();
|
||||
async function runInit(codeql, config, sourceRoot) {
|
||||
fs.mkdirSync(config.dbLocation, { recursive: true });
|
||||
// TODO: replace this code once CodeQL supports multi-language tracing
|
||||
for (const language of config.languages) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue