Use proper check for existence of search path

Fixes #499
This commit is contained in:
Andrew Eisenberg
2020-07-15 21:51:01 -07:00
parent 57ea215639
commit 565ea0d8a0

View File

@@ -604,7 +604,7 @@ export class CodeQLCliServer implements Disposable {
*/
resolveQlpacks(additionalPacks: string[], searchPath?: string[]): Promise<QlpacksInfo> {
const args = ['--additional-packs', additionalPacks.join(path.delimiter)];
if (searchPath !== undefined) {
if (searchPath?.length) {
args.push('--search-path', path.join(...searchPath));
}