Normalize shell name before selecting URL-matching regex (#2070)

This commit is contained in:
Adam Bosco 2017-08-10 07:45:02 -07:00 committed by Philippe Potvin
parent 4e9bd4d953
commit d9dc415eff

View file

@ -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;
}