Comments (6)
nu test-bug.nu
outputs raw input
as per describe
.
Looking at the code, it simply uses string message for all unsupported types:
Value::Record { val, .. } => Value::record(val, span),
Value::Error { .. } => input,
other => Value::error(
ShellError::OnlySupportsThisInputType {
exp_input_type: "string".into(),
wrong_type: other.get_type().to_string(),
dst_span: call.head,
src_span: other.span(),
},
call.head,
),
The error must've been refactored at some point.
I'll replace it with a TypeMismatch
error and send a PR.
from nushell.
upd: I updated nushell to the lattest 0.89.0 version and it still happening
from nushell.
How would 'test string' be converted to a record, there is no key/value?
With your script, when you do nu test-bug.nu | into record
that shouldn't work either because you're shelling out to a new instance of nu
, running a script that returns a record but the the output is converted to a string and then you try to convert a string into a record which isn't supported.
from nushell.
How would 'test string' be converted to a record, there is no key/value?
I'm not saying it should work with strings, i'm saying the hint message is wrong, it shouldn't be a only string input data is supported
because if I pass a string it throw command doesn't support string input
.
from nushell.
oh, i see what you're saying. i wonder why it says that? maybe it means that nu test-bug.nu
only outputs strings?
from nushell.
While I was making the PR I realized the problem was a different one. The command was never supposed to let raw input
type in, it should've thrown an error earlier. Signature guards didn't work for some reason
from nushell.
Related Issues (20)
- `http` command should provide an option equivalent to `-UseDefaultCredentials` in PS
- `headers`: incorrect error HOT 1
- `move` to the same column creates duplicate keys on records
- Make rm -rv list all the names of individual deleted files HOT 4
- Path completion don't escape special characters correctly HOT 1
- nushell 0.90.1 fails to build in termux Android HOT 3
- detect column output is inconsistent when piped to other commands HOT 1
- Panic when spreading a list to `mkdir` HOT 5
- Text selection doesn't work (Windows) HOT 3
- Make all (applicable) filesystem command signatures accept `...(rest)` instead of `<filename> ...(rest)` HOT 2
- let binding an existing variable to an invalid object drops the previous binding
- `view source` should return entire definition for custom command (redux)
- Module declaration conflicts? HOT 4
- the `$env.config.hooks.env_change.PWD` doesn't work on android HOT 4
- update column where that column is not missing HOT 3
- 0.90.1 build failure HOT 8
- Tab-completed filenames should be single-quoted, not backtick-quoted HOT 10
- Ability to delete/hide variables
- `history --clear` should be "more safe"
- How to expand Windows Shell Shortcuts like `%LocalAppData%`? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nushell.