From 0522307833fdd33b6a37b7c1185cdc4f83cefbbb Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 28 Feb 2025 12:55:46 +0100 Subject: [PATCH] improve deploy script --- packages/docusaurus/src/commands/deploy.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus/src/commands/deploy.ts b/packages/docusaurus/src/commands/deploy.ts index 1b6138f1f5..6e7fe82d58 100644 --- a/packages/docusaurus/src/commands/deploy.ts +++ b/packages/docusaurus/src/commands/deploy.ts @@ -224,7 +224,7 @@ You can also set the deploymentBranch property in docusaurus.config.js .`); const toPath = await fs.mkdtemp( path.join(os.tmpdir(), `${projectName}-${deploymentBranch}`), ); - exec(`cd ${toPath}`, {failfast: true}); + process.chdir(toPath); // Clones the repo into the temp folder and checks out the target branch. // If the branch doesn't exist, it creates a new one based on the @@ -248,7 +248,7 @@ You can also set the deploymentBranch property in docusaurus.config.js .`); logger.error`Copying build assets from path=${fromPath} to path=${targetPath} failed.`; throw err; } - exec('git add --all'); + exec('git add --all', {failfast: true}); const gitUserName = process.env.GIT_USER_NAME; if (gitUserName) {