Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit 5b31aa6

Browse files
committed
fix bug
1 parent 3c3ed0d commit 5b31aa6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/agent/onefuzz-task/src/local/create_template.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,11 @@ fn generate_template(items: Vec<ListElement>) -> Result<PathBuf> {
149149
let filename = "template";
150150
let mut filepath = format!("./{}.yaml", filename);
151151
let mut output_file = Path::new(&filepath);
152-
let counter = 0;
152+
let mut counter = 0;
153153
while output_file.exists() {
154154
filepath = format!("./{}-{}.yaml", filename, counter);
155155
output_file = Path::new(&filepath);
156+
counter += 1;
156157
}
157158

158159
std::fs::write(output_file, serde_yaml::to_string(&definition)?)?;

0 commit comments

Comments
 (0)