Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tools/js/extractSlotComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ if (!version) {
process.exit(1)
}

if (!/^[a-zA-Z0-9._-]+$/.test(version)) {
console.error('Invalid version: must contain only alphanumeric characters, dots, underscores, or hyphens')
process.exit(1)
}

if (!fs.existsSync(sourceDir)) {
cp.execSync(`git clone -b client${version} https://github.com/extremeheat/extracted_minecraft_data.git ${sourceDir} --depth 1`, { stdio: 'inherit' })
}
Expand Down
Loading