()
| 11 | } |
| 12 | |
| 13 | export const checkWorkspaceEmpty = async () => { |
| 14 | let files |
| 15 | try { |
| 16 | files = await readDir(env.WORKSPACE_ROOT, { encoding: 'utf8' }) |
| 17 | } catch (error) { |
| 18 | throw new Error('Failed to check workspace') |
| 19 | } |
| 20 | return files.length === 0 |
| 21 | } |
| 22 | |
| 23 | // capture the workspace root to use the users dirname in processes |
| 24 | export const getWorkspaceRoot = (): string => { |