Skip to content

Commit b71664d

Browse files
committed
Sanitize commander inputs in buildScripts/copyFolder.mjs #7987
1 parent 1c032ad commit b71664d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

buildScripts/copyFolder.mjs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import { Command } from 'commander/esm.mjs';
2-
import fs from 'fs-extra';
1+
import {Command} from 'commander/esm.mjs';
2+
import fs from 'fs-extra';
3+
import {sanitizeInput} from './util/Sanitizer.mjs';
34

45
const program = new Command('copyFolder')
56
.version('1.0.0')
6-
.option('-s, --source <value>', 'path to the source folder')
7-
.option('-t, --target <value>', 'path to the target folder')
7+
.option('-s, --source <value>', 'path to the source folder', sanitizeInput)
8+
.option('-t, --target <value>', 'path to the target folder', sanitizeInput)
89
.allowUnknownOption()
910
.parse(process.argv);
1011

0 commit comments

Comments
 (0)