From aec616233014f36806d2dbc2026fed4ea98e7fc9 Mon Sep 17 00:00:00 2001 From: daimond113 <72147841+daimond113@users.noreply.github.com> Date: Mon, 1 Apr 2024 10:52:09 +0200 Subject: [PATCH] fix(patches): remove manifest requirement --- src/cli/root.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cli/root.rs b/src/cli/root.rs index b3612de..9acd597 100644 --- a/src/cli/root.rs +++ b/src/cli/root.rs @@ -293,7 +293,7 @@ pub fn root_command(cmd: Command) -> anyhow::Result<()> { let dir = DIRS .data_dir() .join("patches") - .join(package.0.escaped()) + .join(format!("{}@{}", package.0.escaped(), package.1)) .join(Utc::now().timestamp().to_string()); if dir.exists() { @@ -334,11 +334,10 @@ pub fn root_command(cmd: Command) -> anyhow::Result<()> { .and_then(|f| f.to_str()) .unwrap(); - let manifest = Manifest::from_path(&dir)?; let patch_path = project.path().join(PATCHES_FOLDER); create_dir_all(&patch_path)?; - let patch_path = patch_path.join(format!("{name}@{}.patch", manifest.version)); + let patch_path = patch_path.join(format!("{name}.patch")); if patch_path.exists() { anyhow::bail!( "patch already exists. remove the file {} to create a new patch",