puppetlabs-toy-chest / wash

Wide Area SHell: a cloud-native shell for bringing remote infrastructure to your terminal.
https://puppetlabs.github.io/wash
Apache License 2.0
180 stars 29 forks source link

Failure in volume.FS List is ignored #742

Closed MikaelSmith closed 4 years ago

MikaelSmith commented 4 years ago

If find in volume.FS's List fails, the error is logged but the ls call still succeeds (exits 0) and reports the directory as empty. It should fail and return the error.

MikaelSmith commented 4 years ago

A little more context on this: volume.FS swallown the error because we may get useful output even if find exits non-zero due to lack of permissions on some targets. However, we also ignore stderr. Some possible improvements here are

Specific test was ls on the filesystem for a Bolt target that doesn't exist.