Skip to content

Commit

Permalink
fix: 2nd run of unauthenticated scan
Browse files Browse the repository at this point in the history
  • Loading branch information
vlasy committed Jan 6, 2020
1 parent a6b3c52 commit b0ef8fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class DXScannerCommand extends Command {
const container = createRootContainer({ uri: scanPath, auth: authorization, json, fail, recursive: flags.recursive });
const scanner = container.get(Scanner);

scanResult = await scanner.scan();
scanResult = await scanner.scan({ determineRemote: false });
}
cli.action.stop();
notifier.notify({ isGlobal: true });
Expand Down
4 changes: 2 additions & 2 deletions src/scanner/Scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ export class Scanner {
this.allDetectedComponents = undefined;
}

async scan(): Promise<ScanResult> {
async scan({ determineRemote } = { determineRemote: true }): Promise<ScanResult> {
let scanStrategy = await this.scanStrategyDetector.detect();
if (scanStrategy.accessType === AccessType.unknown) {
if (determineRemote && scanStrategy.accessType === AccessType.unknown) {
return { shouldExitOnEnd: this.shouldExitOnEnd, needsAuth: true, serviceType: scanStrategy.serviceType };
}
this.scanDebug(`Scan strategy: ${inspect(scanStrategy)}`);
Expand Down

0 comments on commit b0ef8fd

Please sign in to comment.