From 9b91beca06c6b7cf47924e3ee8cb3cbd54ebf625 Mon Sep 17 00:00:00 2001 From: Matt Ball Date: Fri, 2 Aug 2019 12:17:38 -0700 Subject: [PATCH] update installedPackages on success --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 96c34456..728b3e53 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,11 @@ if (pkgs && (reqs === installed)) { url: `localhost:3000?packages=${reqs}`, method: 'GET' }, (err, res) => { - eval(res.text()); - pm.globals.set('installedPackages', reqs); - pm.globals.set('packages', res.text()); + if (!err) { + eval(res.text()); + pm.globals.set('installedPackages', reqs); + pm.globals.set('packages', res.text()); + } }); } ```