Skip to content

Commit a4039b7

Browse files
committed
feat: use set_current_dir
1 parent 8cace63 commit a4039b7

3 files changed

Lines changed: 3 additions & 30 deletions

File tree

src/endpoint/root.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! Endpoint root.
22
3+
use std::env::set_current_dir;
4+
35
use api_framework::{
46
framework::{
57
StateError, StateResult,
@@ -87,10 +89,7 @@ async fn post_transaction(
8789
service: ServiceConfig,
8890
) -> StateResult<()> {
8991
async fn inner(cx: &QueuedAsyncFrameworkContext, service: &ServiceConfig) -> StateResult<()> {
90-
// cd to workspace
91-
transactions::sys::cd(&DOCKER_WORKSPACE_DIR)
92-
.await
93-
.map_err(|_| StateError::Retry)?;
92+
set_current_dir(&*DOCKER_WORKSPACE_DIR).map_err(|_| StateError::Retry)?;
9493

9594
// login to docker
9695
transactions::docker::login()

src/transactions/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
pub mod docker;
2-
pub mod sys;

src/transactions/sys.rs

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)