We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d2e382 commit 3762240Copy full SHA for 3762240
1 file changed
crates/emmylua_doc_cli/src/main.rs
@@ -16,10 +16,25 @@ fn main() {
16
let mut files: Vec<String> = Vec::new();
17
for path in &input {
18
if path.is_relative() {
19
- let abs_path = current_path.join(path).to_str().unwrap().to_string();
20
- files.push(abs_path);
+ match current_path.join(path).to_str() {
+ Some(p) => {
21
+ files.push(p.to_string());
22
+ }
23
+ None => {
24
+ eprintln!("Error: {} is not a valid path.", path.to_str().unwrap());
25
+ exit(1);
26
27
28
} else {
- files.push(path.to_str().unwrap().to_string());
29
+ match path.to_str() {
30
31
32
33
34
35
36
37
38
}
39
40
0 commit comments