guard against running on_clone / on_pull on core

This commit is contained in:
mbecker20
2024-08-10 11:56:18 -07:00
parent 26468ed8ea
commit db41878278
4 changed files with 13 additions and 0 deletions

View File

@@ -96,6 +96,9 @@ impl Resolve<RefreshBuildCache, User> for State {
let repo_dir = config.repo_directory.join(random_string(10));
let mut clone_args: CloneArgs = (&build).into();
// Don't want to run these on core.
clone_args.on_clone = None;
clone_args.on_pull = None;
clone_args.destination = Some(repo_dir.display().to_string());
let access_token = match (&clone_args.account, &clone_args.provider)

View File

@@ -94,6 +94,9 @@ impl Resolve<RefreshRepoCache, User> for State {
let repo_dir = config.repo_directory.join(random_string(10));
let mut clone_args: CloneArgs = (&repo).into();
// No reason to to the commands here.
clone_args.on_clone = None;
clone_args.on_pull = None;
clone_args.destination = Some(repo_dir.display().to_string());
let access_token = match (&clone_args.account, &clone_args.provider)

View File

@@ -101,6 +101,9 @@ pub async fn clone_remote_repo(
}
};
// Don't want to run these on core.
clone_args.on_clone = None;
clone_args.on_pull = None;
clone_args.destination = Some(repo_path.display().to_string());
git::clone(

View File

@@ -55,6 +55,10 @@ pub async fn get_remote_resources(
// This overrides any other method of determining clone path.
clone_args.destination = Some(repo_path.display().to_string());
// Don't want to run these on core.
clone_args.on_clone = None;
clone_args.on_pull = None;
let (mut logs, hash, message, _) = git::clone(
clone_args,
&config.repo_directory,