From d9dc415eff89f11cdea0dc4e7450af19ef71f8e5 Mon Sep 17 00:00:00 2001 From: Adam Bosco Date: Thu, 10 Aug 2017 07:45:02 -0700 Subject: [PATCH] Normalize shell name before selecting URL-matching regex (#2070) --- lib/utils/url-command.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/utils/url-command.js b/lib/utils/url-command.js index 5af379c8..239648ee 100644 --- a/lib/utils/url-command.js +++ b/lib/utils/url-command.js @@ -1,7 +1,8 @@ +import path from 'path'; import * as regex from './url-regex'; export default function isUrlCommand(shell, data) { - const matcher = regex[shell]; // eslint-disable-line import/namespace + const matcher = regex[path.parse(shell).name]; // eslint-disable-line import/namespace if (undefined === matcher || !data) { return null; }