Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
4b6355ff
Commit
4b6355ff
authored
Apr 29, 2012
by
Dries
Browse files
- Patch
#1477110
by msonnabaum: Fixed php path detection in run-tests.sh.
parent
9dd0e7be
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/scripts/run-tests.sh
View file @
4b6355ff
...
...
@@ -254,14 +254,14 @@ function simpletest_script_init($server_software) {
if
(!
empty
(
$args
[
'php'
]))
{
$php
=
$args
[
'php'
]
;
}
elseif
(
!
empty
(
$_ENV
[
'_'
]
))
{
elseif
(
$php_env
=
getenv
(
'_'
))
{
//
'_'
is an environment variable
set
by the shell. It contains the
command
that was executed.
$php
=
$
_ENV
[
'_'
]
;
$php
=
$
php_env
;
}
elseif
(
!
empty
(
$_ENV
[
'SUDO_COMMAND'
]
))
{
elseif
(
$sudo
=
getenv
(
'SUDO_COMMAND'
))
{
//
'SUDO_COMMAND'
is an environment variable
set
by the
sudo
program.
// Extract only the PHP interpreter, not the rest of the command.
list
(
$php
,
)
=
explode
(
' '
,
$
_ENV
[
'SUDO_COMMAND'
]
, 2
)
;
list
(
$php
,
)
=
explode
(
' '
,
$
sudo
, 2
)
;
}
else
{
simpletest_script_print_error
(
'Unable to automatically determine the path to the PHP interpreter. Supply the --php command line argument.'
)
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment