mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
42_npmjs: fix npm outdated command
git-svn-id: https://svn.fhem.de/fhem/trunk@20854 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
43d7507f79
commit
4ea6965cb6
@ -960,6 +960,7 @@ sub ExecuteNpmCommand($) {
|
||||
. '--json --silent --depth=0 2>/dev/null); '
|
||||
. '[ "$L1" != "" ] && [ "$L1" != "\n" ] && echo ", \"listed\": $L1"; '
|
||||
. 'L2=$('
|
||||
. $sudo
|
||||
. $locale
|
||||
. ' npm outdated '
|
||||
. $global
|
||||
@ -1184,6 +1185,7 @@ sub RetrieveNpmOutput($$) {
|
||||
. "<br /><br />"
|
||||
. "You may add the following lines to /etc/sudoers.d/$runningUser:\n"
|
||||
. "<pre>"
|
||||
. " $runningUser ALL=(ALL) NOPASSWD:SETENV: /usr/bin/npm outdated *\n"
|
||||
. " $runningUser ALL=(ALL) NOPASSWD:SETENV: /usr/bin/npm update *\n"
|
||||
. " $runningUser ALL=(ALL) NOPASSWD:SETENV: /usr/bin/npm install *\n"
|
||||
. " $runningUser ALL=(ALL) NOPASSWD:SETENV: /usr/bin/npm uninstall *"
|
||||
@ -1676,11 +1678,12 @@ sub ToDay() {
|
||||
Global installations will be controlled by default and running update/install/uninstall require sudo permissions like this:<br>
|
||||
<br>
|
||||
<code>
|
||||
fhem ALL=(ALL) NOPASSWD:SETENV: /usr/bin/npm outdated *<br>
|
||||
fhem ALL=(ALL) NOPASSWD:SETENV: /usr/bin/npm update *<br>
|
||||
fhem ALL=(ALL) NOPASSWD:SETENV: /usr/bin/npm install *<br>
|
||||
fhem ALL=(ALL) NOPASSWD:SETENV: /usr/bin/npm uninstall *
|
||||
</code><br>
|
||||
<br>
|
||||
<br>s
|
||||
This line may easily be added to a new file in /etc/sudoers.d/fhem and will automatically included to /etc/sudoers from there.<br>
|
||||
Only checking for outdated packages does not require any privileged access at all!<br>
|
||||
<br>
|
||||
@ -1866,7 +1869,7 @@ sub ToDay() {
|
||||
"abstract": "Modul zur Bedienung der Node.js Installation und Updates"
|
||||
}
|
||||
},
|
||||
"version": "v1.1.2",
|
||||
"version": "v1.1.3",
|
||||
"release_status": "stable",
|
||||
"author": [
|
||||
"Julian Pawlowski <julian.pawlowski@gmail.com>"
|
||||
|
Loading…
Reference in New Issue
Block a user