Skip to content

Commit

Permalink
fix(internal/logic/root): resolve issue in cdLogic function
Browse files Browse the repository at this point in the history
- Updated the createdDir variable to initialize with the
  possibleCustomDir parameter

Fixes if the user provides a custom directory and cdLogic would try to
change directories into a empty string.
  • Loading branch information
iton0 committed Dec 21, 2024
1 parent d859e45 commit b48c032
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/logic/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func cdLogic(possibleRepoUrl, possibleCustomDir string) error {
// Starting index of the remote repo name
start := strings.LastIndex(possibleCustomDir, "/") + 1

var createdDir string // Holds the name of the cloned directory
createdDir := possibleCustomDir // Holds the name of the cloned directory

if usedDefaultGit {
if isBare, _ := isBareRepo(possibleCustomDir[start:]); isBare {
Expand Down

0 comments on commit b48c032

Please sign in to comment.