Skip to content

Add special error for calling metadata on $env and $nu#11228

Merged
fdncred merged 1 commit intonushell:mainfrom
kaathewisegit:metadata
Dec 4, 2023
Merged

Add special error for calling metadata on $env and $nu#11228
fdncred merged 1 commit intonushell:mainfrom
kaathewisegit:metadata

Conversation

@kaathewisegit
Copy link
Copy Markdown
Contributor

@kaathewisegit kaathewisegit commented Dec 4, 2023

Trying to call metadata $env or metadata $nu will throw an error:

~> metadata $nu                                                                                                                            
Error:   × Built-in variables `$env` and `$nu` have no metadata
   ╭─[entry #1:1:1]
 1  metadata $nu
   ·          ─┬─
   ·           ╰── no metadata available
   ╰────

@fdncred
Copy link
Copy Markdown
Contributor

fdncred commented Dec 4, 2023

There is at least one built-in variable that has metadata, $in and probably $it for where. So, maybe say, $nu an $env don't have metadata.

@kaathewisegit
Copy link
Copy Markdown
Contributor Author

Edited the error message

@fdncred fdncred merged commit c9aa6ba into nushell:main Dec 4, 2023
@fdncred
Copy link
Copy Markdown
Contributor

fdncred commented Dec 4, 2023

Thanks

@kaathewisegit kaathewisegit deleted the metadata branch December 5, 2023 19:12
hardfau1t pushed a commit to hardfau1t/nushell that referenced this pull request Dec 14, 2023
Trying to call `metadata $env` or `metadata $nu` will throw an error:

```Nushell
~> metadata $nu                                                                                                                            
Error:   × Built-in variables `$env` and `$nu` have no metadata
   ╭─[entry #1:1:1]
 1 │ metadata $nu
   ·          ─┬─
   ·           ╰── no metadata available
   ╰────
```
dmatos2012 pushed a commit to dmatos2012/nushell that referenced this pull request Feb 20, 2024
Trying to call `metadata $env` or `metadata $nu` will throw an error:

```Nushell
~> metadata $nu                                                                                                                            
Error:   × Built-in variables `$env` and `$nu` have no metadata
   ╭─[entry nushell#1:1:1]
 1 │ metadata $nu
   ·          ─┬─
   ·           ╰── no metadata available
   ╰────
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants