Skip to content

Commit

Permalink
fix scope issue
Browse files Browse the repository at this point in the history
  • Loading branch information
BlaineHeffron committed Jul 23, 2024
1 parent 98ea14b commit 192a902
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions cmd/soroban-cli/src/commands/contract/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,19 +239,18 @@ fn copy_contents(from: &Path, to: &Path, overwrite: bool) -> Result<(), Error> {
copy_contents(&path, &new_path, overwrite)?;
} else {
let exists = file_exists(&new_path);
let new_path_str = new_path.to_string_lossy();
if exists {
let new_path_str = new_path.to_string_lossy();
let append = new_path_str.contains(".gitignore") || new_path_str.contains("README.md");
let append =
new_path_str.contains(".gitignore") || new_path_str.contains("README.md");
if append {
append_contents(&path, &new_path)?;
}

if overwrite && !append {
println!("🔄 Overwriting {new_path_str}");
} else {
println!(
"ℹ️ Skipped creating {new_path_str} as it already exists"
);
println!("ℹ️ Skipped creating {new_path_str} as it already exists");
continue;
}
} else {
Expand Down

0 comments on commit 192a902

Please sign in to comment.