Open ntc2 opened 8 years ago
Doing
hasktags --tags-absolute STDIN
results in the error
hasktags: STDIN: canonicalizePath: does not exist (No such file or directory)
because canonicalizePath is applied to all files at https://github.com/MarcWeber/hasktags/blob/7a492fcabcc1ed839be442f43350dcd967f6169e/src/Main.hs#L77.
canonicalizePath
It think the correct behavior is to first convert STDIN into a list of files read from stdin and then call canonicalizePath. If you agree with this solution and don't want to implement it yourself, I would be happy to submit a pull request.
STDIN
stdin
Work around on systems with readlink -f (Linux has it but Mac does not, I think):
readlink -f
<generate files> | xargs -n1 readlink -f | hasktags STDIN
Doing
results in the error
because
canonicalizePath
is applied to all files at https://github.com/MarcWeber/hasktags/blob/7a492fcabcc1ed839be442f43350dcd967f6169e/src/Main.hs#L77.It think the correct behavior is to first convert
STDIN
into a list of files read fromstdin
and then callcanonicalizePath
. If you agree with this solution and don't want to implement it yourself, I would be happy to submit a pull request.