Skip to content

Commit 9b886c8

Browse files
committed
WIP
1 parent 7803ee1 commit 9b886c8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/cli-repl/src/mongosh-repl.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,15 @@ class MongoshNodeRepl implements EvaluationListener {
516516
// the multiline input are replaced at this point.
517517
const newHistoryEntry = makeMultilineJSIntoSingleLine(ev.input);
518518
if (newHistoryEntry.length > 0) {
519-
originalHistory.unshift(newHistoryEntry);
519+
const newLines = [newHistoryEntry];
520+
changeHistory(
521+
newLines,
522+
this.redactHistory === 'remove-redact'
523+
? 'redact-sensitive-data'
524+
: 'keep-sensitive-data'
525+
);
526+
527+
originalHistory.unshift(...newLines);
520528
}
521529
history.splice(0, history.length, ...originalHistory);
522530
originalHistory = null;

0 commit comments

Comments
 (0)