Created
January 7, 2020 17:40
-
-
Save cbergau/96dad716bf61485d5e8ce6f9376bc123 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
StringBuilder sb = new StringBuilder(); | |
try { | |
String line; | |
Process p = Runtime.getRuntime().exec("npm outdated --json"); | |
BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream())); | |
while ((line = input.readLine()) != null) { | |
sb.append(line); | |
} | |
input.close(); | |
} | |
catch (Exception err) { | |
err.printStackTrace(); | |
} | |
System.out.println(sb.toString()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment