Skip to content

Commit fbadc15

Browse files
committed
Also prompt user if the repo in the config is invalid
1 parent 89b00ea commit fbadc15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extensions/ql-vscode/src/run-remote-query.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ export async function runRemoteQuery(cliServer: cli.CodeQLCliServer, credentials
108108
// If it doesn't exist, prompt the user to enter it, and save that value to the config.
109109
let controllerRepo: string | undefined;
110110
controllerRepo = getRemoteControllerRepo();
111-
if (!controllerRepo) {
112-
void logger.log('No controller repository defined.');
111+
if (!controllerRepo || !REPO_REGEX.test(controllerRepo)) {
112+
void logger.log(controllerRepo ? 'Invalid controller repository name.' : 'No controller repository defined.');
113113
controllerRepo = await window.showInputBox({
114114
title: 'Controller repository in which to display progress and results of remote queries',
115115
placeHolder: '<owner>/<repo>',

0 commit comments

Comments
 (0)