(value, state)
| 31 | initial, |
| 32 | history, |
| 33 | validate(value, state) { |
| 34 | if (state && state.name === `command`) return true; |
| 35 | if (state && state.name === `name`) { |
| 36 | if (existsSync(value)) { |
| 37 | return `Directory already exists: ./${value}`; |
| 38 | } else { |
| 39 | return true; |
| 40 | } |
| 41 | } |
| 42 | return !value ? `Please add a value.` : true; |
| 43 | } |
| 44 | }) |
| 45 | .on(`cancel`, () => shouldCancel()) |
| 46 | .run(); |
nothing calls this directly
no outgoing calls
no test coverage detected