Skip to content

Commit

Permalink
Merge pull request #52 from CUMGroup/group-command
Browse files Browse the repository at this point in the history
added check if path is valid
  • Loading branch information
AlexMi-Ha authored Mar 2, 2024
2 parents ce63c16 + b0316d1 commit 98fcddb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions PWManager.CLI/Controllers/InitController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ public ExitCondition Handle(string[] args) {
}

var path = Prompt.Input<string>("Where do you want to create your database file?");
while(!Path.Exists(path)) {
Console.WriteLine("The given path does not exist.");
path = Prompt.Input<string>("Where do you want to create your database file?");
}

var name = Prompt.Input<string>("What's your desired user name?");
while (name.Length <= 1 || !Regex.IsMatch(name, @"^[a-zA-Z]+$")) {
Expand Down

0 comments on commit 98fcddb

Please sign in to comment.