From 70e89bdb7c6fe4932c60d66010ba31beeded210a Mon Sep 17 00:00:00 2001 From: Ggiggle <47661277+Ggiggle@users.noreply.github.com> Date: Wed, 16 Oct 2024 14:32:37 +0800 Subject: [PATCH] fix(volo-cli): use the raw given path of local idl file (#502) --- Cargo.lock | 2 +- volo-cli/Cargo.toml | 2 +- volo-cli/src/idl/add.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3222bf84..d074e385 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3621,7 +3621,7 @@ dependencies = [ [[package]] name = "volo-cli" -version = "0.10.3" +version = "0.10.4" dependencies = [ "anyhow", "clap", diff --git a/volo-cli/Cargo.toml b/volo-cli/Cargo.toml index 64412b53..c5d4278a 100644 --- a/volo-cli/Cargo.toml +++ b/volo-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "volo-cli" -version = "0.10.3" +version = "0.10.4" edition.workspace = true homepage.workspace = true repository.workspace = true diff --git a/volo-cli/src/idl/add.rs b/volo-cli/src/idl/add.rs index 5f472f8c..33ac5255 100644 --- a/volo-cli/src/idl/add.rs +++ b/volo-cli/src/idl/add.rs @@ -3,7 +3,7 @@ use std::{collections::HashMap, path::PathBuf}; use clap::{value_parser, Parser}; use volo_build::{ model::{Entry, GitSource, Idl, Service, Source}, - util::{check_and_get_repo_name, create_git_service, detect_protocol, strip_slash_prefix}, + util::{check_and_get_repo_name, create_git_service, detect_protocol}, }; use crate::{command::CliCommand, context::Context}; @@ -67,7 +67,7 @@ impl CliCommand for Add { let local_service = if self.repo.is_none() && self.git.is_none() { let local_idl = Idl { source: Source::Local, - path: strip_slash_prefix(self.idl.as_path()), + path: self.idl.clone(), includes: self.includes.clone(), }; // only ensure readable when idl is from local