Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3966

Code generation fails silently if user lacks permission to create a directory in $CWD

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.9, 0.9.3
    • None
    • Compiler (General)
    • None

    Description

      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:

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

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            elserj Josh Elser
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: