Skip to content

Commit ce32e19

Browse files
authored
Fix a bug (#15)
1 parent 58187bd commit ce32e19

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

commands/setup_theme.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ async function setup_theme(themeName) {
8787
zip.extractAllTo('theme-redone', true); // Extract to current directory
8888
spinner.succeed('Unzipping completed');
8989

90+
// Delete the .git directory from the new theme folder
91+
const gitDirPath = path.join(newThemePath, '.git');
92+
if (fs.existsSync(gitDirPath)) {
93+
fs.rmSync(gitDirPath, { recursive: true, force: true });
94+
}
95+
9096
// Rename the extracted folder
9197
// Note: You need to adjust the logic here to determine the correct extracted folder name
9298
spinner.start('Renaming the folder...');

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@webredone/trb-cli",
3-
"version": "3.0.5",
3+
"version": "3.0.6",
44
"description": "TRB-CLI is a handy Node.js CLI that automates the process of managing blocks in a Theme Redone WordPress theme",
55
"main": "index.js",
66
"type": "module",

0 commit comments

Comments
 (0)