mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-17 20:38:06 +00:00
Fix parsing of list of synced dir (#711)
This commit is contained in:
@ -143,8 +143,9 @@ pub fn get_synced_dirs(
|
|||||||
args: &ArgMatches<'_>,
|
args: &ArgMatches<'_>,
|
||||||
) -> Result<Vec<SyncedDir>> {
|
) -> Result<Vec<SyncedDir>> {
|
||||||
let current_dir = std::env::current_dir()?;
|
let current_dir = std::env::current_dir()?;
|
||||||
let dirs: Result<Vec<SyncedDir>> = value_t!(args, name, PathBuf)?
|
let dirs: Result<Vec<SyncedDir>> = args
|
||||||
.iter()
|
.values_of_os(name)
|
||||||
|
.ok_or_else(|| anyhow!("argument '{}' not specified", name))?
|
||||||
.enumerate()
|
.enumerate()
|
||||||
.map(|(index, remote_path)| {
|
.map(|(index, remote_path)| {
|
||||||
let path = PathBuf::from(remote_path);
|
let path = PathBuf::from(remote_path);
|
||||||
@ -261,7 +262,7 @@ pub async fn wait_for_dir(path: impl AsRef<Path>) -> Result<()> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
Err(BackoffError::Transient(anyhow::anyhow!(
|
Err(BackoffError::Transient(anyhow::anyhow!(
|
||||||
"path '{:?}' does not exisit",
|
"path '{:?}' does not exist",
|
||||||
path.as_ref()
|
path.as_ref()
|
||||||
)))
|
)))
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user