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

"jf npm pkg set" does not handle quotation marks correctly. #2854

Open
lauravuo opened this issue Jan 31, 2025 · 1 comment
Open

"jf npm pkg set" does not handle quotation marks correctly. #2854

lauravuo opened this issue Jan 31, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@lauravuo
Copy link

Describe the bug

When running jf npm pkg set license="UNLICENSED" for an npm project the output is as following:

{
  "error": {
    "code": null,
    "summary": "Unexpected token 'U', \"UNLICENSED\" is not valid JSON",
    "detail": ""
  }
}

Instead of error, npm package license should be set correctly.

Current behavior

Following error is returned:

{
  "error": {
    "code": null,
    "summary": "Unexpected token 'U', \"UNLICENSED\" is not valid JSON",
    "detail": ""
  }
}

Reproduction steps

Configure JF with npm-config. Run jf npm pkg set license="UNLICENSED" to set the npm package license.

Expected behavior

License is set correctly for the package (as is without using jf cli).

JFrog CLI version

2.73.2

Operating system type and version

Apple M1 Pro Sequoia 15.2

JFrog Artifactory version

No response

JFrog Xray version

No response

@lauravuo lauravuo added the bug Something isn't working label Jan 31, 2025
@lauravuo
Copy link
Author

The workaround is to use escape chars: jf npm pkg set license=\"UNLICENSED\" but this is not intuitive approach.

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