diff --git a/clients/gen/common.sh b/clients/gen/common.sh index 2e6122998a742..dbd87cff216e8 100755 --- a/clients/gen/common.sh +++ b/clients/gen/common.sh @@ -27,6 +27,7 @@ function gen_client { lang=$1 shift docker run --rm \ + -u "$(id -u):$(id -g)" \ -v "${SPEC_PATH}:/spec" \ -v "${OUTPUT_DIR}:/output" \ openapitools/openapi-generator-cli:v${OPENAPI_GENERATOR_CLI_VER} \ diff --git a/scripts/ci/openapi/client_codegen_diff.sh b/scripts/ci/openapi/client_codegen_diff.sh index 27881aac27726..8e62ab3a97530 100755 --- a/scripts/ci/openapi/client_codegen_diff.sh +++ b/scripts/ci/openapi/client_codegen_diff.sh @@ -50,7 +50,7 @@ mkdir -p "${GO_CLIENT_PATH}" # generate client for target patch mkdir -p "${GO_TARGET_CLIENT_PATH}" -git reset --hard "${previous_mainline_commit}" +git checkout "${previous_mainline_commit}" -- "$SPEC_FILE" ./clients/gen/go.sh "${SPEC_FILE}" "${GO_TARGET_CLIENT_PATH}" diff -u "${GO_TARGET_CLIENT_PATH}" "${GO_CLIENT_PATH}" || true