From eeaf4be15140236a3e2818a56f35895a4b7511e0 Mon Sep 17 00:00:00 2001 From: Albin Ekblom Date: Sat, 13 May 2017 16:19:03 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Cleanup=20call=20of=20php-escape?= =?UTF-8?q?-shell=20(#1821)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/actions/ui.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/actions/ui.js b/lib/actions/ui.js index 337bb81a..8af758e6 100644 --- a/lib/actions/ui.js +++ b/lib/actions/ui.js @@ -1,4 +1,4 @@ -import * as shellEscape from 'php-escape-shell'; +import {php_escapeshellcmd as escapeShellCmd} from 'php-escape-shell'; import last from '../utils/array'; import isExecutable from '../utils/file'; import getRootGroups from '../selectors'; @@ -238,10 +238,7 @@ export function openFile(path) { console.error(err.stack); notify('Unable to open path', `"${path}" doesn't exist.`); } else { - // We need to use 'php-escape-shell' property this way - // until this eslint issue will be fixed: - // https://github.com/eslint/eslint/issues/6755 - let command = shellEscape.php_escapeshellcmd(path).replace(/ /g, '\\ '); + let command = escapeShellCmd(path).replace(/ /g, '\\ '); if (stats.isDirectory()) { command = `cd ${command}\n`; } else if (stats.isFile() && isExecutable(stats)) {