From 6750ce16670a09055d5c40a9197453ee2a36af2b Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Fri, 7 Jul 2023 12:38:38 +0200 Subject: [PATCH] Print invalid version on parse error Signed-off-by: Evan Lezar --- internal/config/image/cuda_image.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/config/image/cuda_image.go b/internal/config/image/cuda_image.go index 1fe51c54..f7a6713b 100644 --- a/internal/config/image/cuda_image.go +++ b/internal/config/image/cuda_image.go @@ -148,9 +148,10 @@ func (i CUDA) GetDriverCapabilities() DriverCapabilities { } func (i CUDA) legacyVersion() (string, error) { - majorMinor, err := parseMajorMinorVersion(i[envCUDAVersion]) + cudaVersion := i[envCUDAVersion] + majorMinor, err := parseMajorMinorVersion(cudaVersion) if err != nil { - return "", fmt.Errorf("invalid CUDA version: %v", err) + return "", fmt.Errorf("invalid CUDA version %v: %v", cudaVersion, err) } return majorMinor, nil