Skip to content

Commit

Permalink
Add missing deps to make all tests work
Browse files Browse the repository at this point in the history
  • Loading branch information
tennox committed Nov 24, 2023
1 parent 0a6c335 commit 4c344d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Setting up a devenv

1. Install [nix](https://github.com/DeterminateSystems/nix-installer) (or install the required dependencies yourself, but for e.g. tests, there are a lot)
2. Install direnv (optional, recommended for ease of use)
2. Install [direnv](https://direnv.net/) (optional, recommended for ease of use)
3. Run `direnv allow` / `nix develop --impure`

### Tests
Expand Down
2 changes: 2 additions & 0 deletions devenv-test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
sbt
go-task
cargo-make
jbang

#handled by `languages` above:
# python3
Expand All @@ -32,5 +33,6 @@
env = {
NODE_HOME = "${pkgs.nodejs}";
# JAVA_HOME = "${pkgs.adoptopenjdk-jre-bin.home}"; - seems to be handled by languages.java
JBANG_HOME = "${pkgs.jbang}/bin";
};
}
6 changes: 3 additions & 3 deletions src/polyglot/sdkman.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ mod tests {
#[test]
fn test_init_env() {
init_env();
println!("JAVA_HOME: {}", env::var("JAVA_HOME").unwrap());
println!("JBANG_HOME: {}", env::var("JBANG_HOME").unwrap());
println!("PATH: {}", env::var("PATH").unwrap());
println!("JAVA_HOME: {}", env::var("JAVA_HOME").expect("env: JAVA_HOME"));
println!("JBANG_HOME: {}", env::var("JBANG_HOME").expect("env: JBANG_HOME"));
println!("PATH: {}", env::var("PATH").expect("env: PATH"));
}
}

0 comments on commit 4c344d4

Please sign in to comment.