Skip to content

Commit

Permalink
fix update cache warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederik Delaere committed Sep 23, 2020
1 parent a7f0922 commit 43452e1
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cache.rs
Original file line number Diff line number Diff line change
@@ -182,7 +182,11 @@ pub fn update(modulepath: &str, shell: &str) -> bool {
let first = modulename.chars().next().unwrap();
let second = if modulename.len() >= 2 { &modulename[1..2] } else { "" };

if modulename == format!("{}{}", MODULESINDEX, release_debug()) {
if modulename == format!("{}", MODULESINDEX) {
continue;
}

if modulename == format!("{}_debug", MODULESINDEX ) {
continue;
}
// modulename can start with /
4 changes: 4 additions & 0 deletions src/script.rs
Original file line number Diff line number Diff line change
@@ -735,6 +735,10 @@ pub fn get_output(selected_module: &str, action: &str, shell: &str) -> Vec<Strin
} else if shell == "python" {
data = format!("os.environ[\"{}\"] = \"{}\";", result.0, result.1);
} else if shell == "r" {
// todo
// if result.0 = LD_LIBRARY_PATH
// loop through that folder and for each *.so
// dyn.load('lib.so')
data = format!("Sys.setenv({} = \"{}\")", result.0, result.1);
} else if shell == "perl" {
data = format!("$ENV{{{}}}=\"{}\";", result.0, result.1);

0 comments on commit 43452e1

Please sign in to comment.