skip error when bundleDir not exist

This commit is contained in:
wenjun-standby
2021-10-26 15:40:03 +08:00
committed by GitHub
parent 52f52d5376
commit 084ff480bc

View File

@@ -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
}