From 084ff480bc559e6f47beb950988cfbb5abbd117f Mon Sep 17 00:00:00 2001 From: wenjun-standby <78535501+wenjun-standby@users.noreply.github.com> Date: Tue, 26 Oct 2021 15:40:03 +0800 Subject: [PATCH] skip error when bundleDir not exist --- cmd/nvidia-container-runtime/runtime_factory.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/nvidia-container-runtime/runtime_factory.go b/cmd/nvidia-container-runtime/runtime_factory.go index 79db2415..2ae45a61 100644 --- a/cmd/nvidia-container-runtime/runtime_factory.go +++ b/cmd/nvidia-container-runtime/runtime_factory.go @@ -161,7 +161,9 @@ func getOCISpecFilePath(bundleDir string) (string, error) { logger.Infof("Bundle directory path is empty, using working directory.") workingDirectory, err := os.Getwd() if err != nil { - return "", fmt.Errorf("error getting working directory: %v", err) + // don't return error here, the later oci.spec.load for 'runc create' will raise it. + logger.Errorf("error getting working directory: %v", err) + return "", nil } bundleDir = workingDirectory }