Skip to content

Commit c27447d

Browse files
authored
Merge pull request #75 from fahad-israr/patch-config-editor
Selective Configuration edit feature added
2 parents daa5643 + a063de1 commit c27447d

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

cli/src/main/java/dev/starfix/Starfix.java

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -201,22 +201,16 @@ public void editConfig() throws Exception {
201201

202202
// -----------Now we'll get preferred clone path on local file system from
203203
// user--------------
204-
while (true) {
205-
System.out.println("\n--------Enter preferred Clonning path--------");
206-
String clonePathInput = reader.readLine();
207-
if(clonePathInput == null || clonePathInput.isEmpty()){
208-
System.out.println("Empty/blank input provided - reseting to existing/default setting");
209-
break;
210-
}
211-
// We'll check if the path enterd by user exists else try creating it
212-
File tmp = new File(clonePathInput);
213-
if (tmp.exists()||tmp.mkdir()){
214-
clone_path = clonePathInput;
215-
break;
216-
}
217-
// Incase of Invalid path he'll be shown an error and directed to try again
218-
System.out.println("\n--------Invalid Path!! Try Again--------");
204+
205+
System.out.println("\n--------Enter preferred Clonning path--------");
206+
String clonePathInput = reader.readLine();
207+
if(clonePathInput == null || clonePathInput.isEmpty()){
208+
System.out.println("Empty/blank input provided - reseting to existing/default setting");
209+
}else{
210+
clone_path = clonePathInput;
219211
}
212+
213+
220214
// ----------Now we'll write configurations to the YAML FILE------------
221215
ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
222216
Properties configuration = new Properties();

0 commit comments

Comments
 (0)