clap-utils: trim single-quotes from signer uris on windows
This commit is contained in:
parent
0c66099cec
commit
6649dfa899
|
@ -258,6 +258,15 @@ pub(crate) fn parse_signer_source<S: AsRef<str>>(
|
||||||
let source = {
|
let source = {
|
||||||
#[cfg(target_family = "windows")]
|
#[cfg(target_family = "windows")]
|
||||||
{
|
{
|
||||||
|
// trim matched single-quotes since cmd.exe won't
|
||||||
|
let mut source = source;
|
||||||
|
while let Some(trimmed) = source.strip_prefix('\'') {
|
||||||
|
source = if let Some(trimmed) = trimmed.strip_suffix('\'') {
|
||||||
|
trimmed
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
source.replace("\\", "/")
|
source.replace("\\", "/")
|
||||||
}
|
}
|
||||||
#[cfg(not(target_family = "windows"))]
|
#[cfg(not(target_family = "windows"))]
|
||||||
|
|
Loading…
Reference in New Issue