MCPcopy
hub / github.com/lebab/lebab / getInputFile

Method getInputFile

src/OptionParser.js:67–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65 }
66
67 getInputFile() {
68 if (this.program.args.length > 1) {
69 throw `Only one input file allowed, but ${this.program.args.length} given instead.`;
70 }
71 if (this.program.args[0] && !fs.existsSync(this.program.args[0])) {
72 throw `File ${this.program.args[0]} does not exist.`;
73 }
74 return this.program.args[0];
75 }
76
77 getReplace() {
78 if (!this.opts().replace) {

Callers 1

parseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected