From 8f719b17e3d7d801aff0b37d3f4f6a1d23694213 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Tue, 8 Oct 2019 00:17:23 -0700 Subject: [PATCH] Add instrumentation, fix typo Summary: - plugns -> plugins - Report platform failures from second invocation. Reviewed By: jknoxville Differential Revision: D17787179 fbshipit-source-id: 041325f572dd839bd268612269f3774518a409b2 --- src/chrome/PluginInstaller.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/chrome/PluginInstaller.tsx b/src/chrome/PluginInstaller.tsx index ef97027d3..5c0b46f4f 100644 --- a/src/chrome/PluginInstaller.tsx +++ b/src/chrome/PluginInstaller.tsx @@ -261,13 +261,16 @@ function useNPMSearch( useEffect(() => { reportUsage(`${TAG}:open`); reportPlatformFailures( - getInstalledPlugns(), + getInstalledPlugins(), `${TAG}:getInstalledPlugins`, ).then(setInstalledPlugins); }, []); const onInstall = useCallback(async () => { - setInstalledPlugins(await getInstalledPlugns()); + reportPlatformFailures( + getInstalledPlugins(), + `${TAG}:getInstalledPlugins`, + ).then(setInstalledPlugins); setRestartRequired(true); }, []); @@ -333,7 +336,7 @@ function useNPMSearch( return List(results.map(createRow)); } -async function getInstalledPlugns() { +async function getInstalledPlugins() { const dirs = await fs.readdir(PLUGIN_DIR); const plugins = await Promise.all<[string, PluginDefinition]>( dirs.map(