Listen to git commits for a specific repo and run a shell command

Cargo fmt

vielle.dev 5f3e0f3f 9492ba66

verified
Changed files
+13 -5
src
+13 -5
src/main.rs
··· 1 1 fn help() { 2 - println!("Help: tangled-on-commit 2 + println!( 3 + "Help: tangled-on-commit 3 4 Listen for commits on a specified repository and execute a shell command. 4 5 5 6 CLI Arguments: ··· 32 33 Loads the environment variables `TANGLED_ON_COMMIT_HANDLE` and `TANGLED_ON_COMMIT_REPO_NAME` 33 34 Shell cannot be set by environment variables. 34 35 Env variables are used if relevant keys are ommitted an arguments aren't passed to the CLI. 35 - ") 36 + " 37 + ) 36 38 } 37 39 38 40 #[derive(Debug)] ··· 198 200 // couldnt resolve every value 199 201 // print an error and quit 200 202 println!("Unable to find a value for every setting. Missing values for:"); 201 - if handle.is_none() {println!("- handle");} 202 - if repo_name.is_none() {println!("- repo_name");} 203 - if shell.is_none() {println!("- shell");} 203 + if handle.is_none() { 204 + println!("- handle"); 205 + } 206 + if repo_name.is_none() { 207 + println!("- repo_name"); 208 + } 209 + if shell.is_none() { 210 + println!("- shell"); 211 + } 204 212 println!("\nRun `tangled-on-commit --help` to see the help message"); 205 213 return Err(()); 206 214 }