sourcedir 输入 :return: sourcedir
(self)
| 139 | return None |
| 140 | |
| 141 | def input_source_dir(self): |
| 142 | """ |
| 143 | sourcedir 输入 |
| 144 | :return: sourcedir |
| 145 | """ |
| 146 | def check_func(source_dir): |
| 147 | source_dir = PathMgr().format_path(source_dir) |
| 148 | if os.path.exists(source_dir): |
| 149 | return True |
| 150 | else: |
| 151 | return False |
| 152 | try: |
| 153 | source_dir = SmartInput().input(prompt="本地代码目录:", |
| 154 | check_func=check_func, |
| 155 | retry_prompt="路径不存在, 请重新输入:") |
| 156 | # 格式化目录路径,确保格式唯一 |
| 157 | source_dir = PathMgr().format_path(source_dir) |
| 158 | return source_dir |
| 159 | except InputRetryError as err: |
| 160 | logger.warning(str(err)) |
| 161 | return None |
| 162 | except EOFError as err: |
| 163 | logger.warning(str(err)) |
| 164 | return None |
| 165 | |
| 166 | def input_scm_type(self): |
| 167 | """ |
no test coverage detected