commit 02c784d23e0db26cc0abc3889e96f66c0d3d7c2f
parent 146863f7cb3b7a7a35482ba7a9a4298101961084
Author: Stefan Koch <programming@stefan-koch.name>
Date: Sat, 14 Sep 2019 18:00:54 +0200
execute all commands in the cloned git repo
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/lib.rs b/src/lib.rs
@@ -1,3 +1,4 @@
+use std::env;
use std::path::PathBuf;
use rand::Rng;
@@ -29,6 +30,10 @@ pub fn run(repo_url: &str) {
println!("Workdir is at {:?}", workdir.path);
+ // Switch to the exported work dir so that all commands
+ // are executed there
+ assert!(env::set_current_dir(&workdir.path).is_ok());
+
let mut cinderella_file = workdir.path.clone();
cinderella_file.push(".cinderella.toml");