• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
do shell script flaw
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: do shell script flaw
      • From: Emmanuel LEVY <email@hidden>
References: 
 >Re: Do shell script vs terminal discrepancy (From: airdrummer <email@hidden>)
 >Re: Do shell script vs terminal discrepancy (From: Paul Skinner <email@hidden>)
 >Re: Do shell script vs terminal discrepancy (From: Simon Topliss <email@hidden>)
 >Re: Do shell script vs terminal discrepancy (From: Paul Skinner <email@hidden>)

  • Prev by Date: Re: Do shell script vs terminal discrepancy
  • Next by Date: Odd File Write Issue
  • Previous by thread: Re: Do shell script vs terminal discrepancy
  • Next by thread: Re: do shell script flaw
  • Index(es):
    • Date
    • Thread