Skip to content

Commit 2fe3448

Browse files
committed
Exclude license files during skill content collection
- should skip placing license file e.g. LICENSE.txt
1 parent c04404c commit 2fe3448

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎apps/editor/src/views/panel/backend/utils/symbols/skill/replace-skill-symbol.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ export const replace_skill_symbol = async (params: {
5757
if (stats.isDirectory()) {
5858
collect_files(file_path)
5959
} else if (stats.isFile()) {
60-
if (file_name.toLowerCase() == 'readme.md') continue
60+
const lower_name = file_name.toLowerCase()
61+
if (lower_name == 'readme.md' || lower_name.startsWith('license'))
62+
continue
6163
const content = fs.readFileSync(file_path, 'utf-8')
6264
const relative_path = path
6365
.relative(skill.path, file_path)

0 commit comments

Comments
 (0)