Skip to content

Commit

Permalink
Fix base dir path
Browse files Browse the repository at this point in the history
  • Loading branch information
popzxc committed Sep 10, 2024
1 parent de7f4c2 commit e45a175
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion prover/crates/lib/keystore/src/keystore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,15 @@ impl Keystore {

/// Uses automatic detection of the base path, and assumes that setup keys
/// are stored in the same directory.
///
/// The "base" path is considered to be equivalent to the `prover/data/keys`
/// directory in the repository.
pub fn locate() -> Self {
// There might be several cases:
// - We're running from the prover workspace.
// - We're running from the core workspace.
// - We're running the binary from the docker.
let base_path = match Workspace::locate() {
let data_dir_path = match Workspace::locate() {
Workspace::None => {
// We're running a binary, likely in a docker.
// Keys can be in one of a few paths.
Expand All @@ -77,6 +80,7 @@ impl Keystore {
ws.prover().join("data")
}
};
let base_path = data_dir_path.join("keys");

Self {
basedir: base_path.clone(),
Expand Down

0 comments on commit e45a175

Please sign in to comment.