gobanos/cargo-aoc

Running `Cargo aoc -g` doesn't generate new file

Opened this issue · 3 comments

As it currently stands, running cargo aoc -g to generate the file for the new day, without setting the day flag, either:

  • panics on "No implementation found" if there are no previous days implemented, as there aren't any days in target/aoc/completed.json;
  • does reach the if args.generate block if there are previous days implemented, but won't do anything as the files for that day have already been generated, as to be in target/aoc/completed.json, the files need to already have been made;

cargo-aoc input generates the file though.

That indeed does work, thank you.

However, it doesn't take away from the fact that it's still broken. It seems like it could either just be removed in favor of promoting cargo aoc input -g, or the current day would need to be fetched for cargo aoc -g

In this version it's been changed so that it only generates with -g