tweak source parsing to allow quotes around string (#666)

This commit is contained in:
Darren Schroeder 2022-01-04 17:44:48 -06:00 committed by GitHub
parent 74dcd91cc3
commit 4584d69715
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {