Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2892143
ArcanistCommand.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
ArcanistCommand.php
View Options
<?php
final
class
ArcanistCommand
extends
Phobject
{
private
$logEngine
;
private
$executableFuture
;
private
$resolveOnError
=
false
;
public
function
setExecutableFuture
(
PhutilExecutableFuture
$future
)
{
$this
->
executableFuture
=
$future
;
return
$this
;
}
public
function
getExecutableFuture
(
)
{
return
$this
->
executableFuture
;
}
public
function
setLogEngine
(
ArcanistLogEngine
$log_engine
)
{
$this
->
logEngine
=
$log_engine
;
return
$this
;
}
public
function
getLogEngine
(
)
{
return
$this
->
logEngine
;
}
public
function
setResolveOnError
(
$resolve_on_error
)
{
$this
->
resolveOnError
=
$resolve_on_error
;
return
$this
;
}
public
function
getResolveOnError
(
)
{
return
$this
->
resolveOnError
;
}
public
function
execute
(
)
{
$log
=
$this
->
getLogEngine
(
)
;
$future
=
$this
->
getExecutableFuture
(
)
;
$command
=
$future
->
getCommand
(
)
;
$log
->
writeNewline
(
)
;
$log
->
writeStatus
(
' $ '
,
tsprintf
(
'**%s**'
,
phutil_string_cast
(
$command
)
)
)
;
$log
->
writeNewline
(
)
;
$err
=
$future
->
resolve
(
)
;
$log
->
writeNewline
(
)
;
if
(
$err
&&
!
$this
->
getResolveOnError
(
)
)
{
$log
->
writeError
(
pht
(
'ERROR'
)
,
pht
(
'Command exited with error code %d.'
,
$err
)
)
;
throw
new
CommandException
(
pht
(
'Command exited with nonzero error code.'
)
,
$command
,
$err
,
''
,
''
)
;
}
return
$err
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 16:18 (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1126410
Default Alt Text
ArcanistCommand.php (1 KB)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment