here is my code:
and here is my output:
I am running ubuntu 18.04.
This code is located inside an application index.js file (located in $OSJSFOLDER/src/packages/RemoteMenu/index.js)
Description of code:
I am using the proc provider to run a linux command into a pseudo terminal. The command gets all of the desktop files located in /usr/share/applications where the .desktop file category is ‘Office’ and then prints their filenames.
I am expecting console.log(the one in the data event) to print out 1(and only 1) output which contains the list of desktop files that have a category of office.
what is actually happening: The console.log isn’t running 1 time, but (as shown in the picture) 7 times! where the output contains only a subset of desktop files with the category of office.
Why is this, and is there a way to change it?