Skip to content

Commit f4fc2ce

Browse files
committed
Look for script file when inline script is absent
Automatically switch to look for script file if actual script body is not inline in command description in the plist file.
1 parent 5f2ef1c commit f4fc2ce

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

AbracodeFramework/OnMyCommand.cp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2994,6 +2994,11 @@ OnMyCommandCM::GetOneCommandParams(CommandDescription &outDesc, CFDictionaryRef
29942994
}
29952995
}
29962996

2997+
if(outDesc.command == nullptr)
2998+
{ //no inline command found - change the default execution mode to script file
2999+
outDesc.executionMode = kExecPopenScriptFile;
3000+
}
3001+
29973002
//execution
29983003
if( oneCmd.GetValue(CFSTR("EXECUTION_MODE"), theStr) )
29993004
{
@@ -3043,7 +3048,8 @@ OnMyCommandCM::GetOneCommandParams(CommandDescription &outDesc, CFDictionaryRef
30433048
}
30443049
else
30453050
{
3046-
LOG_CSTR( "OMC->GetOneCommandParams. EXECUTION_MODE is not valid. Defaulting to exe_popen\n" );
3051+
//not an error, using default execution mode
3052+
TRACE_CSTR( "OMC->GetOneCommandParams. EXECUTION_MODE is not specified. Defaulting to exe_popen or exe_script_file\n" );
30473053
}
30483054
}
30493055

0 commit comments

Comments
 (0)