cli icon indicating copy to clipboard operation
cli copied to clipboard

`cf push --var value="012345678.91234456678"` treats value as a number

Open squeedee opened this issue 5 years ago • 3 comments

Please fill out the issue checklist below and provide ALL the requested information.

  • [x] I reviewed open and closed github issues that may be related to my problem.
  • [x] I tried updating to the latest version of the CF CLI to see if it fixed my problem.
  • [ ] I attempted to run the command with CF_TRACE=1 to help debug the issue.
  • [x] I am reporting a bug that others will be able to reproduce.

Describe the bug and the command you saw an issue with I was trying to push with a long string that can be cast as a number, but I wanted the string. Full example with README here

What happened The quoted variable was treated as a number and converted to scientific notation

Expected behavior For the quoted string to be treated as a string and not cast

To Reproduce please see the demo app: https://github.com/cf-platform-eng/cf-cli-test/tree/v0.0.1

Provide more context Mac OSX 10.4.16 CF CLI 6.49.0 through Homebrew

squeedee avatar Feb 13 '20 21:02 squeedee

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/171266589

The labels on this github issue will be updated when the story is started.

cf-gitbot avatar Feb 13 '20 21:02 cf-gitbot

It's not a pretty workaround, but cf push --var "value=\"01234567689.1234567890123\"" does create the correct output

squeedee avatar Feb 13 '20 21:02 squeedee

Moved the demo app to https://github.com/squeedee/cf-cli-test

squeedee avatar Nov 19 '20 16:11 squeedee