.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / execa / node_modules / cross-spawn / lib / util / escapeCommand.js
1 'use strict';
2
3 var escapeArgument = require('./escapeArgument');
4
5 function escapeCommand(command) {
6     // Do not escape if this command is not dangerous..
7     // We do this so that commands like "echo" or "ifconfig" work
8     // Quoting them, will make them unaccessible
9     return /^[a-z0-9_-]+$/i.test(command) ? command : escapeArgument(command, true);
10 }
11
12 module.exports = escapeCommand;