Using --source results in public and resources below --source

Perhaps my search-fu is simply not sufficient, but I can’t tell from the Docs whether this is expected behaviour, but when I use hugo --source src then public and resources are created in src unless I also using --destination $(pwd)/public.

Is this expected behaviour or a regression, or simply an undefined case?

It might be a wording issue, but source and destination are two different, ehm, topics.

Source means “the root of it all”, meaning EVERYTHING, including assets, static, etc. will start from there. The destination only means the output directory of the resulting website.

That is my understanding and I have at least one site (a test site for a module) where this is the way it works. All the dev-hugo-site stuff is in a subdirectory and the module itself is in root.

Definitely at least that. To my mind source is where the source code lives, not where build outputs, resources etc should live. The command line help text doesn’t really clarify (limited space). @bep, if I come up with improved --help text for --source and --destination that makes this more clear would you accept it?

Alternatively rename --source as --base and --destination as --output or --output-site, though that’s a bigger change and less likely to happen.

I actually kind of don’t like that stuff gets output into the source directory. With C projects I’ve always preferred ones I could have separate build directory from source directory.