forked from github-starred/komodo
guard against running on_clone / on_pull on core
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user