Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 86B4F200B6B for ; Thu, 25 Aug 2016 18:23:37 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 82A22160ABE; Thu, 25 Aug 2016 16:23:32 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C86B1160AA4 for ; Thu, 25 Aug 2016 18:23:31 +0200 (CEST) Received: (qmail 19593 invoked by uid 500); 25 Aug 2016 16:23:21 -0000 Mailing-List: contact notifications-help@yetus.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@yetus.apache.org Delivered-To: mailing list notifications@yetus.apache.org Received: (qmail 19561 invoked by uid 99); 25 Aug 2016 16:23:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Aug 2016 16:23:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id BD0792C0156 for ; Thu, 25 Aug 2016 16:23:20 +0000 (UTC) Date: Thu, 25 Aug 2016 16:23:20 +0000 (UTC) From: "Allen Wittenauer (JIRA)" To: notifications@yetus.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YETUS-342) non-existent --basedir gives bad error message MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 25 Aug 2016 16:23:37 -0000 [ 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)