From dc1c88d83892abc90f66a7d10ae992a61c5fe4f6 Mon Sep 17 00:00:00 2001 From: Jordan Doyle Date: Sat, 24 Feb 2024 19:59:52 +0000 Subject: [PATCH] Fix docker build --- Dockerfile | 2 +- src/main.rs | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6dec25d..3e1e614 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM rust:1-slim-bookworm AS builder -RUN apt update && apt install -y make +RUN apt update && apt install -y make pkg-config clang COPY . /sources WORKDIR /sources diff --git a/src/main.rs b/src/main.rs index 11092fa..d380ec0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -585,13 +585,6 @@ impl thrussh::server: match args.next().as_deref() { Some("git-upload-pack") => { - // check the executable requested to be ran is the `git-upload-pack` we - // expect. we're not actually going to execute this, but we'll pretend - // to be it instead in `data`. - if args.next().as_deref() != Some("git-upload-pack") { - anyhow::bail!("not git-upload-pack"); - } - // parse the requested project from the given path (the argument // given to `git-upload-pack`) let arg = args.next(); @@ -603,10 +596,10 @@ impl thrussh::server: self.project = Some(Arc::from(project.to_string())); } else { session.extended_data(channel, 1, CryptoVec::from_slice(indoc::indoc! {b" - \r\nNo project was given in the path part of the SSH URI. A GitLab group and project should be defined in your .cargo/config.toml as follows: - [registries] - my-project = {{ index = \"ssh://domain.to.registry.com/my-group/my-project\" }}\r\n - "})); + \r\nNo project was given in the path part of the SSH URI. A GitLab group and project should be defined in your .cargo/config.toml as follows: + [registries] + my-project = {{ index = \"ssh://domain.to.registry.com/my-group/my-project\" }}\r\n + "})); session.close(channel); } -- libgit2 1.7.2