mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-29 07:21:46 +00:00
Print invalid version on parse error
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
1081cecea9
commit
6750ce1667
@ -148,9 +148,10 @@ func (i CUDA) GetDriverCapabilities() DriverCapabilities {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (i CUDA) legacyVersion() (string, error) {
|
func (i CUDA) legacyVersion() (string, error) {
|
||||||
majorMinor, err := parseMajorMinorVersion(i[envCUDAVersion])
|
cudaVersion := i[envCUDAVersion]
|
||||||
|
majorMinor, err := parseMajorMinorVersion(cudaVersion)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("invalid CUDA version: %v", err)
|
return "", fmt.Errorf("invalid CUDA version %v: %v", cudaVersion, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return majorMinor, nil
|
return majorMinor, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user