MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / expand_path

Function expand_path

crates/chat-cli/src/cli/mcp.rs:488–495  ·  view source on GitHub ↗
(os: &Os, p: &str)

Source from the content-addressed store, hash-verified

486}
487
488fn expand_path(os: &Os, p: &str) -> Result<PathBuf> {
489 let p = shellexpand::tilde(p);
490 let mut path = PathBuf::from(p.as_ref() as &str);
491 if path.is_relative() {
492 path = os.env.current_dir()?.join(path);
493 }
494 Ok(path)
495}
496
497async fn ensure_config_file(os: &Os, path: &PathBuf, output: &mut impl Write) -> Result<McpServerConfig> {
498 if !os.fs.exists(path) {

Callers 1

executeMethod · 0.70

Calls 3

joinMethod · 0.80
current_dirMethod · 0.80
as_refMethod · 0.45

Tested by

no test coverage detected