Skip to content

Commit 491cd59

Browse files
att
1 parent 18229bd commit 491cd59

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

luasrc/patch.lua

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ private_vibescript.configure_patch = function ()
77
error("No repo provided in patch")
88
end
99
local patch_dest = os.getenv("HOME").."/.vibescript_patches/"
10-
local hasher = dtw.newHash()
10+
local hasher = dtw.newHasher()
1111
hasher.digest(patch.repo)
1212

1313
local patch_folder = patch_dest..hasher.get_value()
1414
dtw.create_dir_recursively(patch_folder)
15-
os.execute("git clone "..patch.repo.." "..patch_folder)
15+
if not dtw.isdir(patch_folder) then
16+
os.execute("git clone "..patch.repo.." "..patch_folder)
17+
end
18+
local git_pull_command = "cd "..patch_folder.." && git pull"
19+
os.execute(git_pull_command)
20+
1621

1722
end
1823
end

0 commit comments

Comments
 (0)