Skip to content

Commit

Permalink
fixed virtualenv module
Browse files Browse the repository at this point in the history
  • Loading branch information
reujab committed Jul 9, 2018
1 parent 439b788 commit 51297f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/virtualenv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ use Segment;

pub fn segment(segment: &mut Segment, _: &[&str]) {
segment.value = Path::new(&env::var("VIRTUAL_ENV").unwrap_or_default())
.file_name()
.iter()
.next()
.unwrap_or_default()
.to_str()
.unwrap()
Expand Down

0 comments on commit 51297f5

Please sign in to comment.