Finding a workspace
No verb opens a dialog and no verb creates a workspace.
No verb opens a dialog and no verb creates a workspace. The manifest is resolved from things the caller can see, first hit wins:
| Source | |
|---|---|
| 1 | --workspace <path> — a .smcworkspace file, or a folder holding exactly one |
| 2 | SQLMC_WORKSPACE |
| 3 | The nearest .smcworkspace, walking up from the working directory |
| 4 | The active entry in the workspace index (%APPDATA%\SqlMulticast\workspaces.json) |
| 5 | The first index entry whose file still exists |
| 6 | The workspace recorded in settings.json |
Nothing found is exit 3, naming what to do about it:
No workspace found. Pass --workspace, set SQLMC_WORKSPACE, or run `sqlmc workspace new` from the folder you want it in.
Two behaviors are worth stating on their own.
A named workspace that does not exist stops there. It does not fall through to the next source. Someone who named a workspace has told you which one they mean, and quietly using a different one because that one was missing is the worst outcome available.
A folder holding two manifests resolves to neither. Picking the alphabetically first would be a coin flip dressed up as a rule. Name the file.