Skip to content

Commit ac067d9

Browse files
author
zhangfuwen
committed
fix error
1 parent 1bade2b commit ac067d9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lua/github_nvim/clone.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ M = {}
44

55

66
function M.clone(config)
7+
print(vim.inspect(config))
78
is_repo_public = true
89
message = "no message"
910
messageHighlight = "SpecialKey"
@@ -116,6 +117,7 @@ function M.clone(config)
116117
end
117118

118119
if not util.path_exists(user_dir) then
120+
print("making user_dir "..user_dir)
119121
util.mkdir_p(user_dir)
120122
end
121123

@@ -128,18 +130,18 @@ function M.clone(config)
128130
if result.code == 0 then
129131
update_message("success, path: ".. repo_dir, "Error")
130132
if config.on_clone_success then
131-
promptYesNo("close window and open it?", function()
133+
util.promptYesNo("close window and open it?", function()
132134
layout:unmount()
133135
config.on_clone_success(repo_dir)
134136
end)
135137
else
136-
promptYesNo("close window?", function()
138+
util.promptYesNo("close window?", function()
137139
layout:unmount()
138140
end)
139141
end
140142
else
141143
update_message("failed, reason: " .. result.stderr, "Error")
142-
promptYesNo("remove local and retry?", function()
144+
util.promptYesNo("remove local and retry?", function()
143145
util.rm_rf(repo_dir)
144146
do_clone(user_name, repo_name)
145147
end)

0 commit comments

Comments
 (0)