diff --git a/cmd/nvidia-ctk-installer/toolkit/installer/executables.go b/cmd/nvidia-ctk-installer/toolkit/installer/executables.go index 4f595bb90..0bedd8511 100644 --- a/cmd/nvidia-ctk-installer/toolkit/installer/executables.go +++ b/cmd/nvidia-ctk-installer/toolkit/installer/executables.go @@ -162,7 +162,7 @@ func (w *render) render() (io.Reader, error) { {{- if (.CheckModules) }} cat /proc/modules | grep -e "^nvidia " >/dev/null 2>&1 if [ "${?}" != "0" ]; then - echo "nvidia driver modules are not yet loaded, invoking {{ .DefaultRuntimeExecutablePath }} directly" + echo "nvidia driver modules are not yet loaded, invoking {{ .DefaultRuntimeExecutablePath }} directly" >&2 exec {{ .DefaultRuntimeExecutablePath }} "$@" fi {{- end }} diff --git a/cmd/nvidia-ctk-installer/toolkit/installer/executables_test.go b/cmd/nvidia-ctk-installer/toolkit/installer/executables_test.go index 28a5e0c09..7c8b0d83c 100644 --- a/cmd/nvidia-ctk-installer/toolkit/installer/executables_test.go +++ b/cmd/nvidia-ctk-installer/toolkit/installer/executables_test.go @@ -51,7 +51,7 @@ func TestWrapperRender(t *testing.T) { expected: `#! /bin/sh cat /proc/modules | grep -e "^nvidia " >/dev/null 2>&1 if [ "${?}" != "0" ]; then - echo "nvidia driver modules are not yet loaded, invoking runc directly" + echo "nvidia driver modules are not yet loaded, invoking runc directly" >&2 exec runc "$@" fi /dest-dir/some-runtime \ diff --git a/cmd/nvidia-ctk-installer/toolkit/installer/installer_test.go b/cmd/nvidia-ctk-installer/toolkit/installer/installer_test.go index 313f348fc..d308fb3c3 100644 --- a/cmd/nvidia-ctk-installer/toolkit/installer/installer_test.go +++ b/cmd/nvidia-ctk-installer/toolkit/installer/installer_test.go @@ -170,7 +170,7 @@ func TestToolkitInstaller(t *testing.T) { wrapper: `#! /bin/sh cat /proc/modules | grep -e "^nvidia " >/dev/null 2>&1 if [ "${?}" != "0" ]; then - echo "nvidia driver modules are not yet loaded, invoking runc directly" + echo "nvidia driver modules are not yet loaded, invoking runc directly" >&2 exec runc "$@" fi NVIDIA_CTK_CONFIG_FILE_PATH=/foo/bar/baz/.config/nvidia-container-runtime/config.toml \ @@ -185,7 +185,7 @@ PATH=/foo/bar/baz:$PATH \ wrapper: `#! /bin/sh cat /proc/modules | grep -e "^nvidia " >/dev/null 2>&1 if [ "${?}" != "0" ]; then - echo "nvidia driver modules are not yet loaded, invoking runc directly" + echo "nvidia driver modules are not yet loaded, invoking runc directly" >&2 exec runc "$@" fi NVIDIA_CTK_CONFIG_FILE_PATH=/foo/bar/baz/.config/nvidia-container-runtime/config.toml \ @@ -200,7 +200,7 @@ PATH=/foo/bar/baz:$PATH \ wrapper: `#! /bin/sh cat /proc/modules | grep -e "^nvidia " >/dev/null 2>&1 if [ "${?}" != "0" ]; then - echo "nvidia driver modules are not yet loaded, invoking runc directly" + echo "nvidia driver modules are not yet loaded, invoking runc directly" >&2 exec runc "$@" fi NVIDIA_CTK_CONFIG_FILE_PATH=/foo/bar/baz/.config/nvidia-container-runtime/config.toml \