(
name: string,
options: WorksetPathOptions = {}
)
| 343 | * never-opened workset has no file - ENOENT is fine. |
| 344 | */ |
| 345 | export async function removeWorkset( |
| 346 | name: string, |
| 347 | options: WorksetPathOptions = {} |
| 348 | ): Promise<void> { |
| 349 | await withWorksetsLock(async (state) => { |
| 350 | const next = withoutWorkset(state, name); |
| 351 | await writeFileAtomically( |
| 352 | getWorksetsFilePath(options), |
| 353 | serializeWorksetsState(next, options) |
| 354 | ); |
| 355 | await fs.rm(getWorksetCodeWorkspacePath(name, options), { force: true }); |
| 356 | }, options); |
| 357 | } |
| 358 | |
| 359 | function toWorkset( |
| 360 | name: string, |
no test coverage detected