xcell 0.1.1

[XCell](https://github.com/oovm/XCell) command line tool
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::*;

impl XCellArgs {
    pub fn resolve_workspace(&self) -> XResult<PathBuf> {
        if self.workspace.is_empty() {
            return Ok(current_dir()?);
        }
        let path = PathBuf::from(&self.workspace);
        if path.is_absolute() {
            return Ok(path);
        }
        let absolute = current_dir()?.join(path).canonicalize()?;
        Ok(absolute)
    }
}