Skip to content

Commit 792d043

Browse files
committed
Added logs
1 parent 334e045 commit 792d043

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/tests.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1279,6 +1279,18 @@ function testInitCliPartialsBuildDir(): void {
12791279
runBuildCommand('bc', testsBuildName, testBuildNumber);
12801280
}
12811281

1282+
function getJfrogCliPath(): string {
1283+
const versions: string[] = toolLib.findLocalToolVersions('jf');
1284+
if (versions.length === 0) {
1285+
// Fallback to PATH-based execution if CLI is not in tool cache
1286+
return 'jf';
1287+
}
1288+
const cliDir: string = toolLib.findLocalTool('jf', versions[0]);
1289+
const executableName: string = process.platform.startsWith('win') ? 'jf.exe' : 'jf';
1290+
return join(cliDir, executableName);
1291+
}
1292+
12821293
function runBuildCommand(command: string, buildName: string, buildNumber: string): void {
1283-
jfrogUtils.executeCliCommand('jf rt ' + command + ' "' + buildName + '" ' + buildNumber, TestUtils.testDataDir);
1294+
const cliPath: string = getJfrogCliPath();
1295+
jfrogUtils.executeCliCommand(cliPath + ' rt ' + command + ' "' + buildName + '" ' + buildNumber, TestUtils.testDataDir);
12841296
}

0 commit comments

Comments
 (0)