|
|
@@ -133,7 +133,10 @@ public class AppConfigServiceImpl implements AppConfigService {
|
|
|
|
|
|
String repoBranch = appConfigUpdateDto.getRepoBranch();
|
|
|
if (!repoBranch.equals(appConfig.getRepoBranch())) {
|
|
|
- clearLocalRepo(appId);
|
|
|
+ Result result = clearLocalRepo(appId);
|
|
|
+ if (result.getCode() != 0) {
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
String repoAuthName = appConfigUpdateDto.getRepoAuthConfig();
|
|
|
@@ -173,7 +176,10 @@ public class AppConfigServiceImpl implements AppConfigService {
|
|
|
String localRepo = LocalBuildDir.localRepo + File.separator + appId;
|
|
|
File dir = new File(localRepo);
|
|
|
try {
|
|
|
- FileUtils.cleanDirectory(dir);
|
|
|
+ if (dir.exists()) {
|
|
|
+ FileUtils.cleanDirectory(dir);
|
|
|
+ }
|
|
|
+
|
|
|
return Result.result(ResultStatus.SUCCESS);
|
|
|
} catch (IOException e) {
|
|
|
return Result.result(ResultStatus.FAIL, e.getMessage());
|