Josh Elser created THRIFT-3966:
----------------------------------

             Summary: Code generation fails silently if user lacks permission 
to create a directory in $CWD
                 Key: THRIFT-3966
                 URL: https://issues.apache.org/jira/browse/THRIFT-3966
             Project: Thrift
          Issue Type: Bug
          Components: Compiler (General)
    Affects Versions: 0.9.3, 0.9
            Reporter: Josh Elser


It appears that code generation will fail silently (no error message and a 0 
return code) when the current user does not have permission to create a 
directory in the current working directory (the "gen-XXX" directory for the 
corresponding generated bindings).

I was able to easily reproduce this by:

{noformat}
$ cd /
$ thrift --gen py /path/to/some/idl.thrift
$ echo $?
0
$ ls gen-py
ls: gen-py: No such file or directory
{noformat}

I verified this happens on 0.9.0, 0.9.3, and 1.0.0-dev 
(974c99ba38b02288daf05229cdf34e60261d2d01e). I have to assume it also happens 
on 0.9.1 and 0.9.2 but I didn't explicitly verify that.

Ideally, the user would get a "Permission denied" type of error message and 
we'd see a non-zero exit code for the thrift invocation.



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

Reply via email to