Skip to content

Commit

Permalink
Update lockfile in uv add --script
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Dec 25, 2024
1 parent 3067daf commit 602f68b
Show file tree
Hide file tree
Showing 5 changed files with 181 additions and 121 deletions.
6 changes: 3 additions & 3 deletions crates/uv-scripts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@ impl Pep723Script {
}

/// Replace the existing metadata in the file with new metadata and write the updated content.
pub async fn write(&self, metadata: &str) -> Result<(), Pep723Error> {
pub fn write(&self, metadata: &str) -> Result<(), io::Error> {
let content = format!(
"{}{}{}",
self.prelude,
serialize_metadata(metadata),
self.postlude
);

fs_err::tokio::write(&self.path, content).await?;
fs_err::write(&self.path, content)?;

Ok(())
}
Expand Down Expand Up @@ -266,7 +266,7 @@ impl Pep723Metadata {
}

impl FromStr for Pep723Metadata {
type Err = Pep723Error;
type Err = toml::de::Error;

/// Parse `Pep723Metadata` from a raw TOML string.
fn from_str(raw: &str) -> Result<Self, Self::Err> {
Expand Down
Loading

0 comments on commit 602f68b

Please sign in to comment.