Skip to content

Instantly share code, notes, and snippets.

@chasinglogic
Created May 31, 2018 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chasinglogic/204929c5f711251f6a324a7bef5553cd to your computer and use it in GitHub Desktop.
Save chasinglogic/204929c5f711251f6a324a7bef5553cd to your computer and use it in GitHub Desktop.
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