From fe3da8f70b2ce8cbd55436abb3e27c1f4c9af023 Mon Sep 17 00:00:00 2001 From: jpawlowski Date: Mon, 30 Dec 2019 14:34:23 +0000 Subject: [PATCH] 42_npmjs: fix npm outdated command git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@20854 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/42_npmjs.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/FHEM/42_npmjs.pm b/FHEM/42_npmjs.pm index 2a9fa0620..d8856e4c3 100644 --- a/FHEM/42_npmjs.pm +++ b/FHEM/42_npmjs.pm @@ -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($$) { . "

" . "You may add the following lines to /etc/sudoers.d/$runningUser:\n" . "
"
+                      . "  $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:

+ fhem ALL=(ALL) NOPASSWD:SETENV: /usr/bin/npm outdated *
fhem ALL=(ALL) NOPASSWD:SETENV: /usr/bin/npm update *
fhem ALL=(ALL) NOPASSWD:SETENV: /usr/bin/npm install *
fhem ALL=(ALL) NOPASSWD:SETENV: /usr/bin/npm uninstall *

-
+
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.
Only checking for outdated packages does not require any privileged access at all!

@@ -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 "