I initially thought this was a bug in spack/spack#42153, but I think this may be an hdfview issue. When using the "# Default invocation when using modules" execution line in the hdfview.sh script, it appears that the argument -Dhdfview.root="$INSTALLDIR" causes hdfview to look in $INSTALLDIR for input files with a relative path. More concretely, if I run hdfview file.h5, I can see via strace that hdfview ends up looking for $INSTALLDIR/file.h5. It works OK if I run using the full path to the input file, such as hdfview $PWD/file.h5.
I initially thought this was a bug in spack/spack#42153, but I think this may be an hdfview issue. When using the "# Default invocation when using modules" execution line in the hdfview.sh script, it appears that the argument -Dhdfview.root="$INSTALLDIR" causes hdfview to look in $INSTALLDIR for input files with a relative path. More concretely, if I run
hdfview file.h5, I can see via strace that hdfview ends up looking for $INSTALLDIR/file.h5. It works OK if I run using the full path to the input file, such ashdfview $PWD/file.h5.