yetus-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allen Wittenauer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YETUS-342) non-existent --basedir gives bad error message
Date Thu, 25 Aug 2016 16:23:20 GMT

    [ https://issues.apache.org/jira/browse/YETUS-342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15437165#comment-15437165
] 

Allen Wittenauer commented on YETUS-342:
----------------------------------------

bq. but it seems not to fix the problem.

In my tests, the patch worked but the error message doesn't really tell you much:

{code}
HDFS-7859 patch is being downloaded at Thu Aug 25 09:11:44 PDT 2016 from
  https://issues.apache.org/jira/secure/attachment/12825274/HDFS-7859.008.patch -> 404
  https://issues.apache.org/jira/secure/attachment/12825071/HDFS-7859.007.patch -> Downloaded


============================================================================
============================================================================
                        Confirming git environment
============================================================================
============================================================================


ERROR:  is not a valid directory.

{code}

As Kengo points out, the check should probably just get moved to parse_args (around line #966...
holy .... ) right before the yetus_abs call.  That way we fail a bit faster.  It'd also be
nice if the error message specifically says that --basedir isn't a valid directory so the
user knows what dir we're talking about.

To save folks some time, BASEDIR will definitely have a value by the time this check gets
hit in parse_args.  I was thinking specifically about what happens if basedir isn't provided
on the command line.  It's supposed to default to the cwd.  It takes a code path from initialize
to setup_defaults to ... to common_defaults where it is set.  Right after setup_defaults is
parse_args so no need to check for empty string.

> non-existent --basedir gives bad error message
> ----------------------------------------------
>
>                 Key: YETUS-342
>                 URL: https://issues.apache.org/jira/browse/YETUS-342
>             Project: Yetus
>          Issue Type: Bug
>          Components: Test Patch
>    Affects Versions: 0.2.0
>            Reporter: Allen Wittenauer
>            Assignee: Karen Clark
>         Attachments: YETUS-342.00.patch, YETUS-342.01.patch
>
>
> if the --basedir param points to something that doesn't exist, the error message printed
is bad:
> {code}
> ERROR:  is not a git repo.
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message