Skip to content

Commit

Permalink
chore(optic): add a comment about commandSplitter()'s usage (#2771)
Browse files Browse the repository at this point in the history
  • Loading branch information
notnmeyer authored Mar 4, 2024
1 parent 2043823 commit f3ac543
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions projects/optic/src/utils/capture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ export type SpawnCommand = {
args: string[];
};

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

0 comments on commit f3ac543

Please sign in to comment.