Skip to content

Commit

Permalink
don't display markdown when NO_COLOR is set
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederik Delaere committed Jan 29, 2019
1 parent 5080ed5 commit 5f5afc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rsmodules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ fn get_readme(selected_module: &str, shell: &str) -> Vec<String> {
match OpenOptions::new().write(true).create(true).truncate(true).open(&mdtmpfile) {
Ok(fileresult) => {
let mut file: File = fileresult;
if markdown && (shell == "zsh" || shell == "bash") {
if markdown && (shell == "zsh" || shell == "bash") && !env::var("NO_COLOR").is_ok() {
let (base_dir, input) = read_input(readme).unwrap();
let parser = Parser::new(&input);

Expand Down

0 comments on commit 5f5afc7

Please sign in to comment.