nicoulaj/broom — pull request #31 by mbrictson (2012-02-05 01:27:19+00:00)
Title: Execute clean commands in a subshell

Each clean command alters the working directory with `cd` and does not reset it. This means that if several project directories are found (identified by relative paths), the first directory will be cleaned, but all subsequent directories will fail now that the project paths are no longer valid relative to the altered working directory.

Solve this by wrapping the `eval` clean command statements in parentheses, [which will cause them to be executed in a subshell](http://superuser.com/a/231884). This means the working directory will not be altered in the master loop.

My shell scripting knowledge is limited, so this may not be the best solution. I'd appreciate feedback.