Skip to content

Commit 25b8fe7

Browse files
committed
Update lockfile in uv add --script
1 parent e142281 commit 25b8fe7

File tree

7 files changed

+580
-117
lines changed

7 files changed

+580
-117
lines changed

crates/uv-cli/src/lib.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -3237,7 +3237,12 @@ pub struct AddArgs {
32373237
/// a new one will be created and added to the script. When executed via `uv run`,
32383238
/// uv will create a temporary environment for the script with all inline
32393239
/// dependencies installed.
3240-
#[arg(long, conflicts_with = "dev", conflicts_with = "optional")]
3240+
#[arg(
3241+
long,
3242+
conflicts_with = "dev",
3243+
conflicts_with = "optional",
3244+
conflicts_with = "package"
3245+
)]
32413246
pub script: Option<PathBuf>,
32423247

32433248
/// The Python interpreter to use for resolving and syncing.

crates/uv-scripts/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -189,15 +189,15 @@ impl Pep723Script {
189189
}
190190

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

200-
fs_err::tokio::write(&self.path, content).await?;
200+
fs_err::write(&self.path, content)?;
201201

202202
Ok(())
203203
}
@@ -266,7 +266,7 @@ impl Pep723Metadata {
266266
}
267267

268268
impl FromStr for Pep723Metadata {
269-
type Err = Pep723Error;
269+
type Err = toml::de::Error;
270270

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

0 commit comments

Comments
 (0)