Skip to content

Commit

Permalink
Fixed incorrect path for python module
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Aug 29, 2023
1 parent 2a90103 commit 8e01123
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rye/src/cli/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@ pub fn execute(cmd: Args) -> Result<(), Error> {
if !imported_something && !src_dir.is_dir() {
let name = metadata.name.expect("project name");
if is_rust {
let project_dir = src_dir.join("python").join(name.replace('-', "_"));
fs::create_dir_all(&src_dir).ok();
let project_dir = dir.join("python").join(name.replace('-', "_"));
fs::create_dir_all(&project_dir).ok();
let rv = env.render_named_str("lib.rs", LIB_RS_TEMPLATE, context! { name })?;
fs::write(src_dir.join("lib.rs"), rv).context("failed to write lib.rs")?;
Expand Down

0 comments on commit 8e01123

Please sign in to comment.