fix: wrap the error

Signed-off-by: Tanguy ⧓ Herrmann <tanguy@dagger.io>
This commit is contained in:
Tanguy ⧓ Herrmann
2022-04-05 13:32:17 +02:00
parent f18a2ce03a
commit 9258cbf02e

View File

@@ -36,7 +36,7 @@ func (t clientFilesystemReadTask) PreRun(_ context.Context, pctx *plancontext.Co
case pi.IsDir() && !isFS:
return fmt.Errorf("path %q cannot be a directory", path)
case err != nil:
return fmt.Errorf("path %q cannot be stat'd", path)
return fmt.Errorf("path %q cannot be stat'd: %w", path, err)
}
if plancontext.IsFSValue(v.Lookup("contents")) {