mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-04 05:16:45 +00:00
98_Installer: enforce to use root homedir for sudo
git-svn-id: https://svn.fhem.de/fhem/trunk@19219 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
9e62fdf590
commit
5905c14097
@ -896,7 +896,7 @@ sub ExecuteNpmCommand($) {
|
||||
}
|
||||
|
||||
my $global = '-g ';
|
||||
my $sudo = 'sudo -n ';
|
||||
my $sudo = 'sudo -H -n ';
|
||||
|
||||
if ( $cmd->{npmglobal} eq '0' ) {
|
||||
$global = '';
|
||||
|
@ -854,7 +854,7 @@ sub ExecuteFhemCommand($) {
|
||||
|
||||
my $installer = {};
|
||||
$installer->{debug} = $cmd->{debug};
|
||||
my $sudo = 'sudo -n ';
|
||||
my $sudo = 'sudo -H -n ';
|
||||
|
||||
$installer->{cpanversions} =
|
||||
'echo n | TEST=$(which cpanm) || echo "sh: command not found: cpanm"; which cpanm >/dev/null 2>&1 && sh -c "'
|
||||
@ -874,8 +874,10 @@ sub ExecuteFhemCommand($) {
|
||||
. '$(which cpanm) -U --quiet --force %PACKAGES%" 2>&1';
|
||||
$installer->{outdatedperl} =
|
||||
'echo n | '
|
||||
. '$(which cpanm) --version 2>&1; '
|
||||
. 'L1=$(cpan-outdated --verbose 2>&1); '
|
||||
. 'sh -c "'
|
||||
. $sudo
|
||||
. '$(which cpanm) --version 2>&1" 2>&1 && '
|
||||
. 'L1=$(cpan-outdated --verbose 2>&1) && '
|
||||
. '[ "$L1" != "" ] && [ "$L1" != "\n" ] && echo "@Outdated:\n$L1"; ';
|
||||
|
||||
my $response;
|
||||
@ -889,9 +891,8 @@ sub ExecuteFhemCommand($) {
|
||||
$installer->{installperl} =
|
||||
'sh -c "curl -fsSL https://git.io/cpanm | '
|
||||
. $sudo
|
||||
. '$(which perl) - App::cpanminus >/dev/null 2>&1" 2>&1; '
|
||||
. 'cpanm --version >/dev/null'
|
||||
. ' && sh -c "'
|
||||
. '$(which perl) - App::cpanminus >/dev/null 2>&1" 2>&1 '
|
||||
. '&& TEST=$(which cpanm) || echo "sh: command not found: cpanm"; which cpanm >/dev/null 2>&1 && sh -c "'
|
||||
. $sudo
|
||||
. ' $(which cpanm) --quiet App::cpanoutdated" 2>&1';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user