Skip to content

Commit

Permalink
PA-15417 blob to text
Browse files Browse the repository at this point in the history
  • Loading branch information
SOOS-JJennings committed Jan 10, 2025
1 parent 9a76559 commit c43eb30
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/services/AnalysisService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,12 @@ class AnalysisService {

const outputFile = Path.join(workingDirectory, finalAttributionStatus.filename);
soosLogger.info(`Writing ${format} report to ${outputFile}`);
FileSystem.writeFileSync(outputFile, JSON.stringify(output, null, 2));

if (fileType === AttributionFileTypeEnum.Json) {
FileSystem.writeFileSync(outputFile, JSON.stringify(output, null, 2));
} else {
FileSystem.writeFileSync(outputFile, await output.text());
}
} else {
soosLogger.error(
`${format} report was not generated. Verify a working directory was provided and try again.`,
Expand Down

0 comments on commit c43eb30

Please sign in to comment.