mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
os: add os.quoted_path/1, use it consistently for running V itself
This commit is contained in:
@@ -745,3 +745,12 @@ pub fn execute_or_exit(cmd string) Result {
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
// quoted path - return a quoted version of the path, depending on the platform.
|
||||
pub fn quoted_path(path string) string {
|
||||
$if windows {
|
||||
return '"$path"'
|
||||
} $else {
|
||||
return "'$path'"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user