Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure Yarn Workspace adapter supports
ember try:reset
.
Fundamentally, `Adapter.prototype.cleanup` **cannot** require `Adatper.prototype.setup` to have been called. _Most_ of the time `.setup` is called before `.cleanup` (this happens with `ember try:each` and `ember try:one`), but when `--skip-cleanup` is specified (e.g. `ember try:one scenario-name --skip-cleanup`) and you subsequently run `ember try:reset` the `.setup` happened in a completely different process. The issue here is a misunderstanding when we added the `WorkspaceAdapter` initially. Basically, the assumtion was that `.setup` was for setting up both local instance state (e.g. the `this._packageAdapters` array) **and** for actually preparing for a `ember try:...` run (doing backups / etc). The fix is to move the internal state setup code directly into `init`/`constructor, and ensure that `.setup` is only used to create the backups themselves.
- Loading branch information