Skip to content

Commit

Permalink
Showing 6 changed files with 3 additions and 25 deletions.
1 change: 0 additions & 1 deletion lib/config-utils.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/config-utils.js.map

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

9 changes: 0 additions & 9 deletions lib/config-utils.test.js
2 changes: 1 addition & 1 deletion lib/config-utils.test.js.map
12 changes: 0 additions & 12 deletions src/config-utils.test.ts
@@ -145,18 +145,6 @@ test("load non-empty input", async t => {
});
});

test("Remote and local configuration paths correctly identified", t => {
// If the path starts with ./, look locally
t.assert(configUtils.isLocal('./file'));
t.assert(configUtils.isLocal('./file@name'));

// Otherwise, if the path contains @ (branch specifier), assume it's a remote repo
t.false(configUtils.isLocal('octo-org/codeql-config/config.yaml@main'));

// Otherwise look locally (this is the fallback)
t.assert(configUtils.isLocal('file'));
});

test("API client used when reading remote config", async t => {
return await util.withTmpDir(async tmpDir => {
process.env['RUNNER_TEMP'] = tmpDir;
2 changes: 1 addition & 1 deletion src/config-utils.ts
@@ -254,7 +254,7 @@ async function initConfig(): Promise<Config> {
return config;
}

export function isLocal(configPath: string): boolean {
function isLocal(configPath: string): boolean {
// If the path starts with ./, look locally
if (configPath.indexOf("./") === 0) {
return true;

0 comments on commit 7c00663

Please sign in to comment.