`detect type`: errors on whitespace-prefixed numbers
Open
Nobody has claimed this yet.
status:needs-triage
- Dominant language
- Rust
- Stars
- 40.5k
- Forks
- 2.3k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 79
Description
Bug report form
- I have done a basic search of the issue tracker to find any existing issues that are similar.
- I have checked that my version is at least the latest stable release available via my installation method.
Describe the bug
detect type errors out if the input contains a number with whitespace prefix.
How to reproduce
" 42" | detect type
Expected behavior
The input should be inferred as string without error.
The inference as string would be consistent with the behaviour of e.g. "42 " | detect type.
Configuration
| key | value |
|---|---|
| version | 0.108.0 |
| major | 0 |
| minor | 108 |
| patch | 0 |
| branch | |
| commit_hash | |
| build_os | linux-x86_64 |
| build_target | x86_64-unknown-linux-gnu |
| rust_version | rustc 1.90.0 (1159e78c4 2025-09-14) |
| rust_channel | stable-x86_64-unknown-linux-gnu |
| cargo_version | cargo 1.90.0 (840b83a10 2025-07-30) |
| build_time | 2025-10-15 19:22:41 +02:00 |
| build_rust_channel | release |
| allocator | standard |
| features | default, network, plugin, rustls-tls, sqlite, trash-support |
| installed_plugins | |
| experimental_options | example=false, reorder-cell-paths=true, pipefail=false, enforce-runtime-annotations=false |
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the reported " 42" | detect type reproduction and compare it with "42 " | detect type to trace the type-inference path. Done means the whitespace-prefixed input completes without an error and is inferred as a string, with regression coverage for both cases if the existing tests are found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100