File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff 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+
12821293function 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}
You can’t perform that action at this time.
0 commit comments