Add support for updating the environment from prep_commands.

Review Request #1222 — Created Oct. 25, 2014 and submitted

dturner-tw
pants
7ac164f...
pants-reviews
benjyw, ity, jinfeng, jsirois, peiyu, zundel

Add support for updating the environment from prep_commands.



ZU
  1. 
      
  2. need pydoc for

    • prep_executable
    • prep_args
    • prep_environ
  3. use namedtuple?

  4. save stderr and print it out on a non-zero exit code from the process on line 55 below?

    1. stderr is handled by workunit in either case, right?

    2. I missed that, I think you are right. Looks like you could have used workunit to handle stdout too. I'm not sure why to prefer one to the other. Maybe it is better to use the workunit one because stdout will be captured in a file if someone wants to debug it?

    3. It looks like workunit mingles all of the stdout across all commands. But here, we need to sometimes separate stdout, so that we can read environment variables out of it.

  5. It would be nice to add a test that exercises the case where the prep command fails to exercise your error handling.

    1. There's already such a case: test_prep_command_fails

  6. 
      
ZU
  1. Ship It!

  2. 
      
DT
IT
  1. Ship It!

  2. 
      
DT
Review request changed

Status: Closed (submitted)

Loading...