Skip to content

Commit a2eedbf

Browse files
committed
add a comment about commandSplitter()'s usage
1 parent 1805578 commit a2eedbf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

projects/optic/src/utils/capture.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ export type SpawnCommand = {
66
args: string[];
77
};
88

9+
// commandSplitter() splits a command and its args into a SpawnCommand--in a naive fashion. it
10+
// assumes that `command` contains a single command, rather than something more complex. since
11+
// there is no validation or safety checks performed on `command` exercise caution where you
12+
// use this.
913
export function commandSplitter(command: string): SpawnCommand {
1014
return {
1115
cmd: command.split(' ')[0],

0 commit comments

Comments
 (0)