Skip to content

Commit 3c1e65d

Browse files
authored
[nuget] adjust launch scripts after additional feedback (open-telemetry#3622)
additional PR feedback
1 parent e7bb24d commit 3c1e65d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

nuget/OpenTelemetry.AutoInstrumentation/contentFiles/any/any/instrument.cmd

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ IF EXIST %COR_PROFILER_PATH% (
1010
set CORECLR_PROFILER_PATH=!COR_PROFILER_PATH!
1111
) ELSE (
1212
set "COR_PROFILER_PATH="
13-
echo RuntimeIdentifier was not specified when building the project. Attempting to use the fallback location.
13+
14+
echo Unable to locate the native profiler inside current directory, possibly due to runtime identifier not being specified when building/publishing. ^
15+
Attempting to use the native profiler from runtimes\win-x64\native and runtimes\win-x86\native subdirectories.
1416

1517
set COR_PROFILER_PATH_64=%BASE_PATH%runtimes\win-x64\native\OpenTelemetry.AutoInstrumentation.Native.dll
1618
set COR_PROFILER_PATH_32=%BASE_PATH%runtimes\win-x86\native\OpenTelemetry.AutoInstrumentation.Native.dll

nuget/OpenTelemetry.AutoInstrumentation/contentFiles/any/any/instrument.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
BASE_PATH="$(cd "$(dirname "$0")" && pwd)"
44

5-
CORECLR_PROFILER_PATH="$(ls "${BASE_PATH}"/OpenTelemetry.AutoInstrumentation.Native.* 2>/dev/null)"
5+
CORECLR_PROFILER_PATH="$(ls ${BASE_PATH}/OpenTelemetry.AutoInstrumentation.Native.* 2>/dev/null)"
66

77
status=$?
88
if [ $status -ne 0 ]; then
9-
echo "RuntimeIdentifier was not specified when building the project. Attempting to use the fallback location."
9+
echo "Unable to locate the native profiler inside current directory, possibly due to runtime identifier not being specified when building/publishing.
10+
Attempting to detect the runtime and use the native profiler from corresponding subdirectory of runtimes directory."
1011

1112
case "$(uname -s | tr '[:upper:]' '[:lower:]')" in
1213
linux*)
@@ -45,7 +46,7 @@ if [ $status -ne 0 ]; then
4546
exit 1
4647
;;
4748
esac
48-
CORECLR_PROFILER_PATH="${BASE_PATH}"/runtimes/"${OS_TYPE}"-"${ARCHITECTURE}"/native/OpenTelemetry.AutoInstrumentation.Native"${FILE_EXTENSION}"
49+
CORECLR_PROFILER_PATH="${BASE_PATH}/runtimes/${OS_TYPE}-${ARCHITECTURE}/native/OpenTelemetry.AutoInstrumentation.Native${FILE_EXTENSION}"
4950
if [ ! -f "${CORECLR_PROFILER_PATH}" ]; then
5051
echo "Unable to locate the native profiler." >&2
5152
exit 1

0 commit comments

Comments
 (0)