fix: handle trailing backslash on windows path when quoting
parent
7231a3f135
commit
9bb848bb61
|
|
@ -761,7 +761,11 @@ pub fn execute_or_exit(cmd string) Result {
|
||||||
// quoted path - return a quoted version of the path, depending on the platform.
|
// quoted path - return a quoted version of the path, depending on the platform.
|
||||||
pub fn quoted_path(path string) string {
|
pub fn quoted_path(path string) string {
|
||||||
$if windows {
|
$if windows {
|
||||||
|
if path.ends_with(path_separator) {
|
||||||
|
return '"${path + path_separator}"'
|
||||||
|
} else {
|
||||||
return '"$path"'
|
return '"$path"'
|
||||||
|
}
|
||||||
} $else {
|
} $else {
|
||||||
return "'$path'"
|
return "'$path'"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue