Skip to content

Commit

Permalink
🔥 Cleanup call of php-escape-shell
Browse files Browse the repository at this point in the history
  • Loading branch information
albinekb committed May 13, 2017
1 parent 0080f1d commit 470b352
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/actions/ui.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 470b352

Please sign in to comment.