Skip to content

Commit e2c6510

Browse files
committed
hiding the dry-run message behind the option flag
1 parent 61b9233 commit e2c6510

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

git-mirror.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ interface CloneOptions {
2020
}
2121

2222
const cloneAction = async (options: CloneOptions, repo: string) => {
23-
console.log(
24-
colors.bgYellow(
25-
"Dry run mode ... none of the commands will actually be run.",
26-
),
27-
);
23+
if (options.dryRun) {
24+
console.log(
25+
colors.bgYellow(
26+
"Dry run mode ... none of the commands will actually be run.",
27+
),
28+
);
29+
}
2830

2931
const localRepo = getLocalPath(
3032
repo,

0 commit comments

Comments
 (0)