Resources bug in 0.59.0 with --gc --ignoreCache?

Hello,

Before filling a bug on Github, I post here to see if i am the only one with this problem.

  • I have several sites using images functions. Works really fine on 0.58.3 and before.

    • I use --gc --cleanDestinationDir --ignoreCache options
    • my ressources are well generated, and if I open my file browser I can see the ressources being uptated as the process goes. Fine.
  • On 0.59.0, all seems to work fine, I can see all the resources/_gen/images being generated and updated, and then at the end they are all removed and the folder becomes empty (and git get all those files missing and propose to commit this file deletion.

  • If I remove --ignoreCache options and use --gc --cleanDestinationDir it seems to work fine.

  • If I remove --gc options and use --cleanDestinationDir --ignoreCache it seems to work fine.

So it seems the --gc --ignoreCache is the problem.

Anyone here with this behaviour ??

I can reproduce it on all my sites.

I filled a bug in Github https://github.com/gohugoio/hugo/issues/6455

It seems that it is the expected behaviour. removing unused files in cache because they are unused. So I close this.