Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JFrog cli not working properly with dotnet sdk-options #2886

Open
vierimaa opened this issue Feb 25, 2025 · 0 comments
Open

JFrog cli not working properly with dotnet sdk-options #2886

vierimaa opened this issue Feb 25, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@vierimaa
Copy link

vierimaa commented Feb 25, 2025

Describe the bug

When using jf dotnet with SDK-related options, some commands do not work correctly. While some options execute successfully, others fail with exit status 1 or do not correctly pass arguments to the dotnet CLI.

Current behavior

jf dotnet --info, Prints correct info but exits with status 1

jf dotnet --info         
10:51:55 [🔵Info] Running dotnet...
Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET program, but dotnet---configfile does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.

Host:
  Version:      8.0.13
  Architecture: x64
  Commit:       eba546b0f0
  RID:          linux-x64

.NET SDKs installed:
  8.0.406 [/home/node/.dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.13 [/home/node/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.13 [/home/node/.dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download
10:51:55 [🔵Info] Trace ID for JFrog Platform logs: 78abb09cfde0b336
10:51:55 [🚨Error] exit status 1

jf dotnet --version, Fails with "no command found" error (exit 1)

f dotnet --version
10:54:21 [🔵Info] Running dotnet...
Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET program, but dotnet---configfile does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
10:54:21 [🔵Info] Trace ID for JFrog Platform logs: 37c7c24a57aed22e
10:54:21 [🚨Error] exit status 1

jf dotnet --help, Displays JFrog CLI help instead

jf dotnet --help

Name:
  jf dotnet - Run .NET Core CLI.

Usage:
  jf dotnet <dotnet sub-command> [command options]
  
Arguments:
  dotnet sub-command
     Arguments and options for the dotnet command.

Options:
  --build-name      [Optional] Providing this option will collect and record build info for this build name. Build number option is mandatory when this option is provided.
  --build-number    [Optional] Providing this option will collect and record build info for this build number. Build name option is mandatory when this option is provided.
  --module          [Optional] Optional module name for the build-info. Build name and number options are mandatory when this option is provided.
  --project         [Optional] JFrog Artifactory project key.

jf dotnet -d / --diagnostics Enable diagnostic output Fails with "no command found" error (exit 1)

jf dotnet --diagnostics
10:55:46 [🔵Info] Running dotnet...
Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET program, but dotnet---configfile does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
10:55:49 [🔵Info] Trace ID for JFrog Platform logs: fea22adc8416a93c
10:55:49 [🚨Error] exit status 1

jf dotnet --list-runtimes, Works correctly
jf dotnet --list-sdks, Works correctly

Reproduction steps

  1. Install JFrog cli
  2. Install .NET
  3. (Optional) Run jf dotnet-config, same errors even if dotnet-config is run or not
  4. Run dotnet problematic commands mentioned above through JF cli e.g. (jf dotnet --version)

Expected behavior

jf dotnet --info

  • should display .NET info and exit 0

jf dotnet --version

  • should show .NET version in use

jf dotnet --help

  • should provide help menu for .NET instead of JFrog

jf dotnet --diagnostics

  • should enable diagonostic output correctly

JFrog CLI version

2.73.2

Operating system type and version

Debian GNU/Linux 11 (Bullseye)

JFrog Artifactory version

No response

JFrog Xray version

No response

@vierimaa vierimaa added the bug Something isn't working label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant