bst workspace open: `--force` and `--no-checkout` don't work well together
Summary
When opening a workspace with both --force and --no-checokut options set, I would expect that the contents of the workspace untouched (due to the --no-checkout flag) and that BuildStream updates the workspace metadata. However that's not what happens. BuildStream ends up removing all contents of the workspace directory, leaving only the .bstproject.yaml file in it.
Steps to reproduce
# Following steps assume that you are running inside a fresh checkout
# of the BuildStream repository.
$ cd tests/frontend/project
# Open workspace for the first time (no issues here)
$ bst workspace open --directory workspace import-bin.bst
$ find workspace
workspace
workspace/usr
workspace/usr/bin
workspace/usr/bin/hello
workspace/.bstproject.yaml
# Now re-open it with `--force` and `--no-checkout` (this is where the bug is)
$ bst workspace open --force --no-checkout --directory workspace import-bin.bst
$ find workspace
workspace
workspace/.bstproject.yaml
What is the current bug behavior?
The "workspace" directory is empty but for the .bstproject.yaml file.
What is the expected correct behavior?
The contents of the "workspace" directory should not change after the second workspace open command.