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
No known key found for this signature in database
GPG Key ID: 0FE2C1C97F50F73B

View File

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