You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently our implementation uses std::fs::* and std::env::* to interact with the filesystem / environment. The problem is, that std::fs::* / std::env::* returns io::Result, while Nushell has its own error type. That leads to either everyone automatically returning the error in a ShellError::untagged_runtime_error() (little ugly), or write a custom conversion.
I would like to have a simple lib, wrapping std::fs, std::env, so we don't come up with 20 different error messages.
This would be best implemented in a new crate (we keep them under crates/). Copying the Cargo.toml file of nu-value-ext could be a good starting point.
I don't need a wrapper around whole std::fs, std::env. Read, write, current_dir, canonicalize would be sufficient for the start.
There is already a wrapper around canonicalize in nu-engine/src/filesystem/path.rs. However it returns io::Error. This function could potentially be moved into nu::fs.
Feel free to ask me for help, if needed, in our Discord (@LhKipp)
This issue has been marked stale for more than 10 days without activity. Closing this issue, but if you find that the issue is still valid, please reopen.
Activity
github-actions commentedon Jun 24, 2021
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
github-actions commentedon Jul 8, 2021
This issue has been marked stale for more than 10 days without activity. Closing this issue, but if you find that the issue is still valid, please reopen.