Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RobiNino committed Sep 4, 2024
1 parent 2a21e7b commit 654f779
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,14 +328,16 @@ class Utils {
if (projectKey) {
Utils.exportVariableIfNotSet('JFROG_CLI_BUILD_PROJECT', projectKey);
}
// Enable command summaries to allow generating job summary and code scanning sarif.
Utils.enableCommandSummaries();
// Enable job summaries if disable was not requested.
if (!core.getBooleanInput(Utils.JOB_SUMMARY_DISABLE)) {
Utils.enableJobSummaries();
}
}
/**
* Enabling job summary is done by setting the output dir for the summaries.
* If the output dir is not set, the CLI won't generate the summary Markdown files.
*/
static enableCommandSummaries() {
static enableJobSummaries() {
let tempDir = this.getTempDirectory();
Utils.exportVariableIfNotSet(Utils.JFROG_CLI_COMMAND_SUMMARY_OUTPUT_DIR_ENV, tempDir);
}
Expand Down
8 changes: 5 additions & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,15 +375,17 @@ export class Utils {
Utils.exportVariableIfNotSet('JFROG_CLI_BUILD_PROJECT', projectKey);
}

// Enable command summaries to allow generating job summary and code scanning sarif.
Utils.enableCommandSummaries();
// Enable job summaries if disable was not requested.
if (!core.getBooleanInput(Utils.JOB_SUMMARY_DISABLE)) {
Utils.enableJobSummaries();
}
}

/**
* Enabling job summary is done by setting the output dir for the summaries.
* If the output dir is not set, the CLI won't generate the summary Markdown files.
*/
private static enableCommandSummaries() {
private static enableJobSummaries() {
let tempDir: string = this.getTempDirectory();
Utils.exportVariableIfNotSet(Utils.JFROG_CLI_COMMAND_SUMMARY_OUTPUT_DIR_ENV, tempDir);
}
Expand Down

0 comments on commit 654f779

Please sign in to comment.