From ac38ecc2673dbe619f4545f3ed1f191c33541c8e Mon Sep 17 00:00:00 2001 From: Justin Wernick Date: Wed, 8 Mar 2023 23:01:37 +0200 Subject: Docker build with the shell set to a relative path so it works --- tests/server_shell.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/server_shell.rs b/tests/server_shell.rs index bf3e1d6..4c4587b 100644 --- a/tests/server_shell.rs +++ b/tests/server_shell.rs @@ -11,12 +11,15 @@ struct TestContext { fn build_docker_image() -> Result<()> { let mut command = std::process::Command::new("docker"); + + let absolute_shell_path = cargo_bin(env!("CARGO_PKG_NAME")); + let relative_shell_path = absolute_shell_path.strip_prefix(std::fs::canonicalize(".")?)?; command.args([ "build", "-t", "shackle-server", "--build-arg", - &format!("SHELL={}", cargo_bin(env!("CARGO_PKG_NAME")).display()), + &format!("SHELL={}", relative_shell_path.display()), "./", ]); -- cgit v1.2.3