🔥 Cleanup call of php-escape-shell (#1821)

This commit is contained in:
Albin Ekblom 2017-05-13 16:19:03 +02:00 committed by Philippe Potvin
parent 0080f1da81
commit eeaf4be151

View file

@ -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)) {