From f662043dc83ebd2af4112321aa364b925a06009d Mon Sep 17 00:00:00 2001 From: mario4tier Date: Tue, 27 Aug 2024 00:01:45 -0400 Subject: [PATCH] Fix to pnpm deploy:walrus script --- .../frontend/scripts/walrus-site-deploy.cjs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dapps/suiftly.walrus.site/packages/frontend/scripts/walrus-site-deploy.cjs b/dapps/suiftly.walrus.site/packages/frontend/scripts/walrus-site-deploy.cjs index 9ecd3ed..a91fb8a 100755 --- a/dapps/suiftly.walrus.site/packages/frontend/scripts/walrus-site-deploy.cjs +++ b/dapps/suiftly.walrus.site/packages/frontend/scripts/walrus-site-deploy.cjs @@ -33,9 +33,9 @@ const main = async () => { // then publish the site to Walrus Sites. if (siteObjectId == null) { console.log('Publishing the app to Walrus Sites...') - const { stdout, stderr } = await exec( - `site-builder --config ${walrusConfigPathFull} --wallet ${WALLET_CONFIG_PATH_FULL} publish ${sitePathFull}` - ) + const exec_command = `site-builder --config ${walrusConfigPathFull} --wallet ${WALLET_CONFIG_PATH_FULL} publish ${sitePathFull}` + console.log(`exec: ${exec_command}`) + const { stdout, stderr } = await exec(exec_command) // Get the site object ID from the publish command output. stdout.on('data', async (data) => { @@ -61,6 +61,10 @@ const main = async () => { stderr.on('data', async (error) => { console.error(error) + // Do not exit if the line starts with "[warn]" + if (error.startsWith('[warn]')) { + return + } process.exit() }) @@ -68,7 +72,9 @@ const main = async () => { } if (siteObjectId == null) { - console.error('~ The script could not find the site object ID in the output.') + console.error( + '~ The script could not find the site object ID in the output.' + ) console.error( '~ If you see it, please add WALRUS_SITE_OBJECT_ID=[site object ID from the output] into packages/frontend/.env.local manually.' )