Created
May 31, 2018 16:38
-
-
Save chasinglogic/204929c5f711251f6a324a7bef5553cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn get_project_files<'a>() -> Vec<&'a str> { | |
let ls_files_output = Command::new("git") | |
.arg("ls-files") | |
.output() | |
.expect("Failed to run git ls-files. Make sure you're in a git repo."); | |
String::from_utf8(ls_files_output.stdout) | |
.unwrap() | |
.split("\n") | |
.collect() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment