Skip to content

Commit

Permalink
Store absolute paths in PEP 723 scripts (astral-sh#10161)
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh authored Dec 25, 2024
1 parent bec8468 commit f40da39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/uv-scripts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl Pep723Script {
let metadata = Pep723Metadata::from_str(&metadata)?;

Ok(Some(Self {
path: file.as_ref().to_path_buf(),
path: std::path::absolute(file)?,
metadata,
prelude,
postlude,
Expand Down Expand Up @@ -124,7 +124,7 @@ impl Pep723Script {
let (shebang, postlude) = extract_shebang(&contents)?;

Ok(Self {
path: file.as_ref().to_path_buf(),
path: std::path::absolute(file)?,
prelude: if shebang.is_empty() {
String::new()
} else {
Expand Down

0 comments on commit f40da39

Please sign in to comment.