Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nhc: Fix detached mode result writability test
In detached mode, we check to see if we can write to the result file before actually trying to do so, but `test -w` returns false for non-existent files, not just unwritable files. So we need to redo the logic of that test to account for both cases: (1) file exists and is writable, or (2) file does not exist but directory does and is writable. While I was at it, I also changed where the write is done to account for a third scenario: (3) everything looks like it should work but the write itself fails. Fixes #59. Thanks to @hwj0303 for spotting this!
- Loading branch information