pass in correct path
This commit is contained in:
parent
f86fb79e73
commit
db48ac41c9
1 changed files with 3 additions and 3 deletions
|
@ -206,12 +206,12 @@ pub fn run(refractr: Refractr, cfgs: Vec<ConfigFile>) -> std::io::Result<()> {
|
||||||
|
|
||||||
// make initial clone
|
// make initial clone
|
||||||
common::verbose(refractr.verbose, 1, format!("Cloning repository: {}", &cfg.config.from));
|
common::verbose(refractr.verbose, 1, format!("Cloning repository: {}", &cfg.config.from));
|
||||||
let repo_dir = &format!("{}/{}", &path_str, repo_name);
|
let repo_dir = format!("{}/{}", &path_str, repo_name);
|
||||||
let repo = match Repository::clone(&cfg.config.from, Path::new(&repo_dir)) {
|
let repo = match Repository::clone(&cfg.config.from, Path::new(&repo_dir)) {
|
||||||
Ok(repo) => repo,
|
Ok(repo) => repo,
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
eprintln!("refractr: warning: found existing repo at {}, attempting to use", repo_dir);
|
eprintln!("refractr: warning: found existing repo at {}, attempting to use", repo_dir);
|
||||||
match fast_forward(&refractr, repo_dir, &cfg.config.branches) {
|
match fast_forward(&refractr, &repo_dir, &cfg.config.branches) {
|
||||||
Ok(_) => if let Ok(repo) = Repository::open(Path::new(&repo_dir)) {
|
Ok(_) => if let Ok(repo) = Repository::open(Path::new(&repo_dir)) {
|
||||||
repo
|
repo
|
||||||
} else {
|
} else {
|
||||||
|
@ -229,7 +229,7 @@ pub fn run(refractr: Refractr, cfgs: Vec<ConfigFile>) -> std::io::Result<()> {
|
||||||
if cfg.config.schedule.enabled {
|
if cfg.config.schedule.enabled {
|
||||||
loop_repos.push(OpenedRepository {
|
loop_repos.push(OpenedRepository {
|
||||||
repo,
|
repo,
|
||||||
path: path_str,
|
path: repo_dir,
|
||||||
remotes,
|
remotes,
|
||||||
cfg: cfg.config
|
cfg: cfg.config
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue