Skip to content

Commit 1769e28

Browse files
authored
Merge pull request hyperledger-indy#673 from dbluhm/cli-comments
Ignore lines starting with # in batch files
2 parents cf5391f + d18162b commit 1769e28

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cli/src/main.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ fn _iter_batch<T>(command_executor: CommandExecutor, reader: T) where T: std::io
157157
let line = if let Ok(line) = line { line } else {
158158
return println_err!("Can't parse line #{}", line_num);
159159
};
160+
161+
if line.starts_with("#") || line.is_empty() {
162+
// Skip blank lines and lines starting with #
163+
continue;
164+
}
165+
160166
println!("{}", line);
161167
let (line, force) = if line.starts_with("-") {
162168
(line[1..].as_ref(), true)

0 commit comments

Comments
 (0)