From f42f253b512f5ba4d52c00b85b06cf7fc4e42770 Mon Sep 17 00:00:00 2001 From: Jordan Date: Tue, 7 Jan 2025 13:19:57 -0500 Subject: [PATCH] initial --- datadog_wrapper | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/datadog_wrapper b/datadog_wrapper index 60b4581..e3d5ce1 100644 --- a/datadog_wrapper +++ b/datadog_wrapper @@ -161,10 +161,14 @@ setUpNodeEnv() { local DD_NODE_TRACER_VERSION_5=5.30.0 - if [[ "$NODE_RUNTIME_VERSION" =~ ^v16.* ]]; then - yarn add "dd-trace@$DD_NODE_TRACER_VERSION_4" || return + if [ -z "${DD_NODE_TRACER_VERSION}" ]; then + if [[ "$NODE_RUNTIME_VERSION" =~ ^v16.* ]]; then + yarn add "dd-trace@$DD_NODE_TRACER_VERSION_4" || return + else + yarn add "dd-trace@$DD_NODE_TRACER_VERSION_5" || return + fi else - yarn add "dd-trace@$DD_NODE_TRACER_VERSION_5" || return + yarn add "dd-trace@$DD_NODE_TRACER_VERSION" fi ORIG_NODE_OPTIONS=$NODE_OPTIONS