View Single Post
Old 01 December 2022, 02:02   #1
tygre
Returning fan!
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
ARexx RC is 0 Even When Command Fails

Hi there!

I'm developing some ARexx scripts to test systematically players but I run into a problem with the following code:

Code:
IF ~SHOW('P', 'AMIGAAMP') THEN DO
   ADDRESS Command 'Run AmigaAMP'
   SAY 'Result1: ' || RC
   SAY 'Result2: ' || Result
   ...
If AmigaAMP (in this example) is not in the path, then the Run command will fail and print out:

Code:
AmigaAMP: Unknown command
AmigaAMP failed returncode 10
But, RC = 0

(I tried redirecting the output of Run to a file using Run >T:Output but it contains only the CLI name, not the two error lines, which are still printed out in the Shell...)

What am I missing?
Tygre
tygre is offline  
 
Page generated in 0.08617 seconds with 11 queries