-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Infinite save --raw #11382
Copy link
Copy link
Closed
Labels
A:file-systemRelated to commands and core nushell behavior around the file systemRelated to commands and core nushell behavior around the file systemcategory:bugSomething isn't workingSomething isn't working
Milestone
Description
Describe the bug
The following code causes nushell to enter an infinite loop that writes over and over to the same file until it runs out of disk space.
glob *.md | each { |f| open --raw $f | prepend "some text" | save --force --raw $f }The bug does not appear if you write a new file name or remove --raw.
How to reproduce
Add some .md files, run the code.
Expected behavior
The specified text must be added to all .md files.
Screenshots
No response
Configuration
| key | value |
|---|---|
| version | 0.88.0 |
| branch | makepkg |
| commit_hash | d43f425 |
| build_os | linux-x86_64 |
| build_target | x86_64-unknown-linux-gnu |
| rust_version | rustc 1.74.1 (a28077b28 2023-12-04) (Arch Linux rust 1:1.74.1-1) |
| cargo_version | cargo 1.74.1 |
| build_time | 2023-12-13 08:32:37 +00:00 |
| build_rust_channel | release |
| allocator | mimalloc |
| features | dataframe, default, extra, sqlite, trash, which, zip |
| installed_plugins | clipboard copy, clipboard paste, emoji, highlight, hist, net, notify, plot, port list, port scan, regex, sound, sound beep, sound make, sound meta, sound meta list, sound meta set, soun d play, units, xyplot |
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A:file-systemRelated to commands and core nushell behavior around the file systemRelated to commands and core nushell behavior around the file systemcategory:bugSomething isn't workingSomething isn't working