mirror of
https://github.com/nushell/nushell
synced 2024-12-26 13:03:07 +00:00
tweak source
parsing to allow quotes around string (#666)
This commit is contained in:
parent
74dcd91cc3
commit
4584d69715
1 changed files with 1 additions and 0 deletions
|
@ -1036,6 +1036,7 @@ pub fn parse_source(
|
|||
// Command and one file name
|
||||
if spans.len() >= 2 {
|
||||
let name_expr = working_set.get_span_contents(spans[1]);
|
||||
let name_expr = trim_quotes(name_expr);
|
||||
if let Ok(filename) = String::from_utf8(name_expr.to_vec()) {
|
||||
if let Ok(path) = canonicalize(&filename) {
|
||||
if let Ok(contents) = std::fs::read(&path) {
|
||||
|
|
Loading…
Reference in a new issue