From cce145a1560487f92f928475b11d07c4ceb096af Mon Sep 17 00:00:00 2001 From: crStiv Date: Mon, 21 Apr 2025 18:34:57 +0200 Subject: [PATCH] Update appstate.go --- cmd/appstate.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/appstate.go b/cmd/appstate.go index 9bb65fd05..66c838238 100644 --- a/cmd/appstate.go +++ b/cmd/appstate.go @@ -130,7 +130,10 @@ func (a *appState) addPathFromUserInput( stderr io.Writer, src, dst, name string, ) error { - // TODO: confirm name is available before going through input. + // Check if the path name is already taken + if _, exists := a.config.Paths[name]; exists { + return fmt.Errorf("path with name '%s' already exists", name) + } var ( value string