#982: Abort with an error if the argument of --root= is not a directory -----------------------------+---------------------------------------------- Reporter: anonymous | Owner: eric9 Type: enhancement | Status: new Priority: minor | Milestone: Component: GetComponents | Version: development version Keywords: error detection | -----------------------------+---------------------------------------------- Currently, when GetComponnents is invoked as
GetComponents --root=<dir>
and <dir> does not exist, Getcomponents just ignores the option. I would be better if GetComponents aborted with an error if the argument of --root= is not a valid directory.
#982: Abort with an error if the argument of --root= is not a directory ----------------------------+----------------------------------------------- Reporter: anonymous | Owner: eric9 Type: enhancement | Status: new Priority: minor | Milestone: ET_2012_11 Component: GetComponents | Version: development version Resolution: | Keywords: error detection ----------------------------+----------------------------------------------- Changes (by knarf):
* milestone: => ET_2012_11
Comment:
I cannot reproduce this. When given a name which doesn't exist yet GetComponents creates that directory for me. When that name is something else than a directory I get a lot of error messages about not being able to change into that directory (which could be improved), but nothing seriously goes wrong.
#982: Abort with an error if the argument of --root= is not a directory ----------------------------+----------------------------------------------- Reporter: anonymous | Owner: eric9 Type: enhancement | Status: new Priority: minor | Milestone: ET_2012_11 Component: GetComponents | Version: development version Resolution: | Keywords: error detection ----------------------------+-----------------------------------------------
Comment (by rhaas):
I agree with Frank that I cannot reproduce this. However error handling in this case should actually detect this and abort much earlier. The attached patch tests for $ROOT being a folder (if it exists at all) as early as possible and aborts with an error if this is not the case.
#982: Abort with an error if the argument of --root= is not a directory ----------------------------+----------------------------------------------- Reporter: anonymous | Owner: eric9 Type: enhancement | Status: review Priority: minor | Milestone: ET_2012_11 Component: GetComponents | Version: development version Resolution: | Keywords: error detection ----------------------------+----------------------------------------------- Changes (by rhaas):
* status: new => review
#982: Abort with an error if the argument of --root= is not a directory ----------------------------+----------------------------------------------- Reporter: anonymous | Owner: eric9 Type: enhancement | Status: reviewed_ok Priority: minor | Milestone: ET_2012_11 Component: GetComponents | Version: development version Resolution: | Keywords: error detection ----------------------------+----------------------------------------------- Changes (by tbode):
* status: review => reviewed_ok
Comment:
Updated the patch with fixed spelling. Does what it should do. Go ahead and push.
#982: Abort with an error if the argument of --root= is not a directory ----------------------------+----------------------------------------------- Reporter: anonymous | Owner: eric9 Type: enhancement | Status: closed Priority: minor | Milestone: ET_2012_11 Component: GetComponents | Version: development version Resolution: fixed | Keywords: error detection ----------------------------+----------------------------------------------- Changes (by rhaas):
* status: reviewed_ok => closed * resolution: => fixed
Comment:
applied as commit 9145812 of CRL.
trac@lists.einsteintoolkit.org