Skip to content

Commit

Permalink
fix: make sure custom directory is absolute
Browse files Browse the repository at this point in the history
Make sure that the working directory is always an absolute path.
When using the -d option, the ceramic daemon won't run due to path issues without this change.
  • Loading branch information
dav1do committed Dec 28, 2023
1 parent c5fcbcf commit f9c75b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cli/src/install/ceramic_daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub async fn install_ceramic_daemon(
if let Ok(exit) = process.wait().await {
let _ = tx.send(exit.clone()).await;
log::info!(
"Ceramic exited with code {}",
"\nCeramic exited with code {}",
exit.code().unwrap_or_else(|| 0)
);
if !exit.success() {
Expand Down
7 changes: 7 additions & 0 deletions cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ async fn main() -> anyhow::Result<()> {
let working_directory = args
.working_directory
.map(PathBuf::from)
.and_then(|p| {
if p.is_absolute() {
Some(p)
} else {
Some(current_directory.join(p))
}
})
.unwrap_or_else(|| current_directory);
let mut versions = wheel_3box::Versions::default();
if let Some(ref v) = args.ceramic_version {
Expand Down

0 comments on commit f9c75b1

Please sign in to comment.