mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-19 07:59:39 +00:00
fix: update console info type for notarize env variable check
This commit is contained in:
parent
2ff09367e7
commit
cd19471ea4
2 changed files with 12 additions and 7 deletions
|
|
@ -11,9 +11,9 @@ exports.default = async function notarizing(context) {
|
|||
|
||||
// Validate required environment variables
|
||||
if (!process.env.APPLE_ID || !process.env.APPLE_APP_SPECIFIC_PASSWORD || !process.env.APPLE_TEAM_ID) {
|
||||
console.error("Missing required environment variables for notarization");
|
||||
console.error("Required: APPLE_ID, APPLE_APP_SPECIFIC_PASSWORD, APPLE_TEAM_ID");
|
||||
throw new Error("Notarization failed: Missing required environment variables");
|
||||
console.warn("Missing Apple environment variables for notarization");
|
||||
console.warn("Skipping notarization. Required: APPLE_ID, APPLE_APP_SPECIFIC_PASSWORD, APPLE_TEAM_ID");
|
||||
return;
|
||||
}
|
||||
|
||||
return notarize({
|
||||
|
|
|
|||
|
|
@ -50,10 +50,15 @@ export async function downloadWithRedirects(url, destinationPath) {
|
|||
}
|
||||
|
||||
// Check if file exists and has size > 0
|
||||
const stats = fs.statSync(destinationPath)
|
||||
if (stats.size === 0) {
|
||||
fs.unlinkSync(destinationPath)
|
||||
reject(new Error('Downloaded file is empty'))
|
||||
try {
|
||||
const stats = fs.statSync(destinationPath)
|
||||
if (stats.size === 0) {
|
||||
fs.unlinkSync(destinationPath)
|
||||
reject(new Error('Downloaded file is empty'))
|
||||
return
|
||||
}
|
||||
} catch (statError) {
|
||||
reject(new Error(`Failed to check downloaded file: ${statError.message}`))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue