UNPKG

bixby-cli

Version:

A CLI for bixby capsule development

22 lines 843 B
"use strict"; var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; result["default"] = mod; return result; }; Object.defineProperty(exports, "__esModule", { value: true }); const shell = __importStar(require("shelljs")); class ShellService { constructor(home) { this.home = home; } find(fileName) { const command = `find ${this.home} -name "${fileName}" 2>&1 | grep -v "Permission denied"`; const findResult = shell.exec(command, { silent: true }); return findResult.stdout.split("\n").filter((elem) => !elem.match(/^\s*$/g)); } } exports.ShellService = ShellService; //# sourceMappingURL=shell.service.js.map