Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/commands/scan/handle-create-new-scan.mts
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,14 @@ export async function handleCreateNewScan({

logger.success('Reachability analysis completed successfully')

scanPaths = reachResult.data?.reachabilityReport
? [reachResult.data.reachabilityReport]
: []
scanPaths = [
...packagePaths.filter(
// Ensure the .socket.facts.json isn't duplicated in case it happened
// to be in the scan folder before the analysis was run.
p => !p.endsWith(constants.DOT_SOCKET_DOT_FACTS_JSON),
),
reachResult.data?.reachabilityReport,
]
tier1ReachabilityScanId = reachResult.data?.tier1ReachabilityScanId
}

Expand Down
3 changes: 2 additions & 1 deletion src/commands/scan/perform-reachability-analysis.mts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ export async function performReachabilityAnalysis(

const wasSpinning = !!spinner?.isSpinning

// Exclude .socket.facts.json from upload.
// Exclude any .socket.facts.json files that happen to be
// in the scan folder before the analysis was run.
const filepathsToUpload = packagePaths.filter(
p => !p.endsWith(constants.DOT_SOCKET_DOT_FACTS_JSON),
)
Expand Down
Loading