mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-18 06:28:40 -09:00
🔥 Cleanup call of php-escape-shell (#1821)
This commit is contained in:
parent
0080f1da81
commit
eeaf4be151
1 changed files with 2 additions and 5 deletions
|
|
@ -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 last from '../utils/array';
|
||||||
import isExecutable from '../utils/file';
|
import isExecutable from '../utils/file';
|
||||||
import getRootGroups from '../selectors';
|
import getRootGroups from '../selectors';
|
||||||
|
|
@ -238,10 +238,7 @@ export function openFile(path) {
|
||||||
console.error(err.stack);
|
console.error(err.stack);
|
||||||
notify('Unable to open path', `"${path}" doesn't exist.`);
|
notify('Unable to open path', `"${path}" doesn't exist.`);
|
||||||
} else {
|
} else {
|
||||||
// We need to use 'php-escape-shell' property this way
|
let command = escapeShellCmd(path).replace(/ /g, '\\ ');
|
||||||
// until this eslint issue will be fixed:
|
|
||||||
// https://github.com/eslint/eslint/issues/6755
|
|
||||||
let command = shellEscape.php_escapeshellcmd(path).replace(/ /g, '\\ ');
|
|
||||||
if (stats.isDirectory()) {
|
if (stats.isDirectory()) {
|
||||||
command = `cd ${command}\n`;
|
command = `cd ${command}\n`;
|
||||||
} else if (stats.isFile() && isExecutable(stats)) {
|
} else if (stats.isFile() && isExecutable(stats)) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue