Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wp-now: repeated blueprint executions will faill #310

Open
lgersman opened this issue Jun 15, 2024 · 2 comments
Open

wp-now: repeated blueprint executions will faill #310

lgersman opened this issue Jun 15, 2024 · 2 comments

Comments

@lgersman
Copy link

lgersman commented Jun 15, 2024

If i repeatedly start wp-now installing a default theme will result in an error:

```
{
	"step": "mkdir",
	"path": "/var/www/html/wp-content/themes"
},
{
	"step": "installTheme",
	"themeZipFile": {
		"resource": "wordpress.org/themes",
		"slug": "twentytwentyfour"
	},
	"options": {
		"activate": true
	}
}

```
Failed to start the server: Error when executing the blueprint step #1 installTheme({"step":"installTheme","themeZipFile":{"resource":"wordpress.org/themes","slug":"twentytwentyfour"},"options":{"activate":true}}) : Could not move /var/www/html/wp-content/mjEznHQBp+eN]u2u(C=<+NjPv4RkH7ystyI-/assets/Twentytwentyfour/twentytwentyfour to /var/www/html/wp-content/themes/twentytwentyfour: Directory not empty.

Both steps will fail when called repeatedly.

mkdir will fail the second time because the path already exists.

installTheme will fail the second time because the theme is already installed.

I suppose there should be an options to make such steps fail gracefully instead of aborting the whole blueprint process.

@sejas
Copy link
Collaborator

sejas commented Jun 26, 2024

@lgersman , have you tried running with --reset flag? Would that fix your issue?

@lgersman
Copy link
Author

Hi @sejas,

Yes, tried the --reset option too, but it doesn't changed the final outcome (an error because the directory was already existing).

BTW: Wouldn't it be neat to have a mkdir step option to gracefully continue if the directory is already existing ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants