You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to integrate pubs into a script. I noticed that when doing pubs doc export onto a filepath that already exists, pubs dispays an error, but the return status is still 0. It would be nice if it would return an error status so that you can do something like pubs doc export foo bar || handle_error.
Additionally, I do kind of wonder if it even makes sense to error when pubs doc export encounters a file that already exists. It takes quite long to type a pubs doc export command, so it's not that I would accidentally run it when I don't want to. Moreover, a lot of unixy file operation command just silently overwrite the file, why should pubs act different (as a program that is commandline user oriented)? Finally, what's the worst that could happen to an user?
It would be at least nice to have an -f flag available to pubs doc export, that will just force a file overwrite.
The text was updated successfully, but these errors were encountered:
That's some great remarks indeed. A flag could definitely be implemented, and yes, the sdtout/stderr distinction is not always well behaved in pubs. I will look into all that.
Cool! I was thinking of doing some simple PRs, maybe I could look into this as well. (stdout/stderr stuff works fine btw, that was a mistake on my part)
I'm trying to integrate
pubs
into a script. I noticed that when doingpubs doc export
onto a filepath that already exists, pubs dispays an error, but the return status is still 0. It would be nice if it would return an error status so that you can do something likepubs doc export foo bar || handle_error
.Additionally, I do kind of wonder if it even makes sense to error when
pubs doc export
encounters a file that already exists. It takes quite long to type apubs doc export
command, so it's not that I would accidentally run it when I don't want to. Moreover, a lot of unixy file operation command just silently overwrite the file, why should pubs act different (as a program that is commandline user oriented)? Finally, what's the worst that could happen to an user?It would be at least nice to have an
-f
flag available topubs doc export
, that will just force a file overwrite.The text was updated successfully, but these errors were encountered: