From 1212ebd65c882c446b822172569f0ef3425a79f7 Mon Sep 17 00:00:00 2001 From: rtm516 Date: Mon, 4 Mar 2024 08:23:20 +0000 Subject: [PATCH] Add git fetch to help prevent missing ref errors --- monitor.js | 1 + 1 file changed, 1 insertion(+) diff --git a/monitor.js b/monitor.js index f777b99..495b33f 100644 --- a/monitor.js +++ b/monitor.js @@ -78,6 +78,7 @@ async function handleMetadata (folder, metadata) { const repoPath = path.join(folder, 'repo') console.log(`Cloning repo to '${repoPath}'`) await execShellCommand(`git clone -n "${repoUrl}" "${repoPath}"`) + await execShellCommand(`git -C "${repoPath}" fetch`) console.log(`Checking out commit'${metadata.commit}'`) await execShellCommand(`git -C "${repoPath}" checkout "${metadata.commit}"`)