* 获取执行描述
(params: Record<string, any>)
| 168 | * 获取执行描述 |
| 169 | */ |
| 170 | protected getExecutionDescription(params: Record<string, any>): string { |
| 171 | const { files, all, update, dryRun } = params; |
| 172 | |
| 173 | let description = ''; |
| 174 | |
| 175 | if (dryRun) { |
| 176 | description += '预览要添加的文件'; |
| 177 | } else if (all) { |
| 178 | description += '添加所有修改的文件'; |
| 179 | } else if (update) { |
| 180 | description += '添加所有已跟踪的文件'; |
| 181 | } else if (files) { |
| 182 | description += `添加指定文件: ${files}`; |
| 183 | } else { |
| 184 | description += '添加当前目录下所有文件'; |
| 185 | } |
| 186 | |
| 187 | return description; |
| 188 | } |
| 189 | |
| 190 | /** |
| 191 | * 获取执行预览 |