The Conferences Of John Cassian by John Cassian
Chapter XI. The answer that we must take into account the purpose of the doer rather than the execution of the business.
Joseph: In every case, as we said, we must look not at the progress of the work but at the intention of the worker, nor must we inquire to begin with what a man has done, but with what purpose, so that we may find that some have been condemned for those deeds from which good has afterwards arisen, and on the other hand that some have arrived by means of acts in themselves reprehensible at the height of righteousness. And in the case of the former the good result of their actions was of no avail to them as they took the matter in and with an evil purpose, and wanted to bring about -- not the good which actually resulted, but something of the opposite character; nor was the bad beginning injurious to the latter, as he put up with the necessity of a blameworthy start; not out of disregard for God, or with the purpose of doing wrong, but with an eye to a needful and holy end.