Skip to content

Commit a063de1

Browse files
author
Fahad Israr
committed
remove path validity checks
1 parent 4fa827a commit a063de1

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
@@ -207,22 +207,16 @@ public void editConfig() throws Exception {
207207

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

0 commit comments

Comments
 (0)