Skip to content

Commit f182044

Browse files
mtorpjdalton
authored andcommitted
exclude .socket.facts.json from socket fix manifest upload
1 parent 1fafb99 commit f182044

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/cli/src/commands/fix/coana-fix.mts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import { readJsonSync } from '@socketsecurity/lib/fs'
88
import { getDefaultLogger } from '@socketsecurity/lib/logger'
99
import { pluralize } from '@socketsecurity/lib/words'
1010

11+
import { DOT_SOCKET_DOT_FACTS_JSON } from '../../constants/packages.mts'
12+
1113
import {
1214
cleanupErrorBranches,
1315
cleanupFailedPrBranches,
@@ -113,9 +115,15 @@ export async function coanaFix(
113115
cwd,
114116
})
115117

118+
// Exclude any .socket.facts.json files that happen to be in the scan
119+
// folder before the analysis was run.
120+
const filepathsToUpload = scanFilepaths.filter(
121+
p => path.basename(p).toLowerCase() !== DOT_SOCKET_DOT_FACTS_JSON,
122+
)
123+
116124
// SDK v3.0 automatically validates file readability via onFileValidation callback.
117125
const uploadCResult = (await handleApiCall(
118-
sockSdk.uploadManifestFiles(orgSlug, scanFilepaths),
126+
sockSdk.uploadManifestFiles(orgSlug, filepathsToUpload),
119127
{
120128
commandPath: 'socket fix',
121129
description: 'upload manifests',

0 commit comments

Comments
 (0)