Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F354124
Masterwork_From_Distant_Lands
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
avivey
Mar 30 2015, 5:01 PM
2015-03-30 17:01:39 (UTC+0)
Size
763 B
Referenced Files
None
Subscribers
None
Masterwork_From_Distant_Lands
View Options
#!/usr/bin/env php
<?php
require_once
dirname
(
__FILE__
).
'/arcanist/scripts/__init_script__.php'
;
function
resolveBinary2
(
$binary
)
{
if
(
phutil_is_windows
())
{
echo
"phutil is windows
\n
"
;
list
(
$err
,
$stdout
)
=
exec_manual
(
'where %s'
,
$binary
);
$stdout
=
phutil_split_lines
(
$stdout
);
// If `where %s` could not find anything, check for relative binary
if
(
$err
)
{
$path
=
Filesystem
::
resolvePath
(
$binary
);
if
(
Filesystem
::
pathExists
(
$path
))
{
return
$path
;
}
return
null
;
}
$stdout
=
head
(
$stdout
);
}
else
{
list
(
$err
,
$stdout
)
=
exec_manual
(
'which %s'
,
$binary
);
echo
"exec actually worked
\n
"
;
}
return
$err
===
0
?
trim
(
$stdout
)
:
null
;
}
echo
resolveBinary2
(
'git'
);
echo
"
\n
"
;
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/v4/fr/tri6trvkodjcakkd
Default Alt Text
Masterwork_From_Distant_Lands (763 B)
Attached To
Mode
P1744 Masterwork From Distant Lands
Attached
Detach File
Event Timeline
Log In to Comment