MCPcopy
hub / github.com/DietrichGebert/ponytail / isShellSafe

Function isShellSafe

hooks/ponytail-config.js:50–52  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

48// to manual setup instead. Allows : \ / for normal Windows and POSIX paths. Full
49// per-shell escaper only if a real need appears.
50function isShellSafe(p) {
51 return typeof p === 'string' && /^[A-Za-z0-9 _.\-:/\\~]+$/.test(p);
52}
53
54function getConfigDir() {
55 if (process.env.XDG_CONFIG_HOME) {

Callers 2

hooks.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected