usc-isi-i2 / kgtk

Knowledge Graph Toolkit
https://kgtk.readthedocs.io/en/latest/
MIT License
351 stars 57 forks source link

`kgtk` Should Complain When Input and Output Files Have the Same Path (Except Stdio) #288

Open CraigMiloRogers opened 3 years ago

CraigMiloRogers commented 3 years ago

kgtk commands should complain when an output file looks like it will overwrite an input file (except for stdin/stdout). We've had at least one user problem so far due to this gotcha.

CraigMiloRogers commented 3 years ago

Probably ought to object when multiple output files have the same path, too.

CraigMiloRogers commented 3 years ago

More succinctly: output file paths must be unique in the set of all file paths.

CraigMiloRogers commented 3 years ago

This rule should apply to entire pipes, not just a single command invocation.