"I was once working for a company that primarily dealt with Oracle products," Tai writes.
That vendor, who shall not be named again, provided an installer. Tai ran it, and it failed. Since the installer was a shell script, she opened up the file and took a look.
./run_first_file.sh
#check_for_success()
./run_second_file.sh
check_for_success()
The first thing Tai noticed is the commented out check_for_success
. It seemed odd to comment that out, unless you had some sort of expected failure, but that raised a bunch of questions about how that was being handled. Out of curiosity, Tai uncommented it, and sure enough, the whole thing failed before hitting the run_second_file.sh
line. But why was it failing?
Well, as it turns out, the installer helper scripts were in a subdirectory. When Tai corrected the installer to this:
# This was my fix
./scripts/run_first_file.sh
check_for_success()
./scripts/run_second_file.sh
check_for_success()
everything worked fine.
In the end, we have a case of a major software vendor providing a trivially broken installer for a product with a price tag that would make your eyes water. At some point, they probably tested it, realized it was failing, and just commented out the check for success. It kept failing, and they just… probably stopped testing? That's my guess: "It fails on this line, but this line is only a safety check, so we just take that line out, now it'll stop failing. Great, ship it!"
I may be being generous in assuming that they tested it at all.