Skip to content

Commit

Permalink
Fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nikola-wd committed Dec 10, 2023
1 parent 58187bd commit c45d2b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions commands/setup_theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ async function setup_theme(themeName) {
zip.extractAllTo('theme-redone', true); // Extract to current directory
spinner.succeed('Unzipping completed');

// Delete the .git directory from the new theme folder
const gitDirPath = path.join(newThemePath, '.git');
if (fs.existsSync(gitDirPath)) {
fs.rmSync(gitDirPath, { recursive: true, force: true });
}

// Rename the extracted folder
// Note: You need to adjust the logic here to determine the correct extracted folder name
spinner.start('Renaming the folder...');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@webredone/trb-cli",
"version": "3.0.5",
"version": "3.0.6",
"description": "TRB-CLI is a handy Node.js CLI that automates the process of managing blocks in a Theme Redone WordPress theme",
"main": "index.js",
"type": "module",
Expand Down

0 comments on commit c45d2b2

Please sign in to comment.