do shell script flaw
do shell script flaw
- Subject: do shell script flaw
- From: Emmanuel LEVY <email@hidden>
- Date: Sat, 5 Dec 2009 17:38:05 +0100
Hi,
There is a problem with the "do shell script" Applescript command.
Our team detected the problem months ago, and narrowing down the bug
implied rewriting some codes specifically.
Finally we identified the faulty sequence:
try
do shell script "ipconfig getifaddr en0"
end try
[...]
do shell script "mkdir -p someNewPath"
In some circumstances (that we are unable to explain, but that we
detect and handle gracefully) the "ipconfig" do shell script line
fails. The problem is that when it does, then the subsequent "mkdir"
do shell script line will spawn an error "The command exited with a
non-zero status" instead of doing its job.
1. there is no way that we know to have do shell script "mkdir -p
someNewPath" issue such a (script) error.
2. the "mkdir" do shell script line runs thousands of times a day: it
will display that nasty behavior only in the case when it runs after
the "ipconfig" line, and only in the case when that "ipconfig" line
fails.
This has been submitted to bugreport.apple.com.
Emmanuel
Satimage-software, and
Quomodo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden