Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pdl-live-react/src-tauri/src/interpreter/pip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub async fn pip_install_if_needed(
create_dir_all(&cache_path)?;

let hash = shasum::sha256sum(&requirements_path)?;
let venv_path = cache_path.join(hash);
let venv_path = cache_path.join("venvs").join(hash);
let bin_path = venv_path.join(if cfg!(windows) { "Scripts" } else { "bin" });

if !venv_path.exists() {
Expand Down
4 changes: 2 additions & 2 deletions pdl-live-react/src-tauri/src/interpreter/shasum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use ::std::fs::File;
use ::std::io::{copy, Result};
use ::std::path::Path;

use base64ct::{Base64, Encoding};
use base64ct::{Base64Url, Encoding};
use sha2::{Digest, Sha256};

pub fn sha256sum(path: &Path) -> Result<String> {
Expand All @@ -12,5 +12,5 @@ pub fn sha256sum(path: &Path) -> Result<String> {
copy(&mut file, &mut hasher)?;
let hash_bytes = hasher.finalize();

Ok(Base64::encode_string(&hash_bytes))
Ok(Base64Url::encode_string(&hash_bytes))
}