@grada-run/grada 0.40.11 → 0.40.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands/secrets.js +6 -0
package/package.json
CHANGED
package/src/commands/secrets.js
CHANGED
|
@@ -422,6 +422,7 @@ async function pullSecretsMain(envFilePath, projectName, options = {}) {
|
|
|
422
422
|
|
|
423
423
|
const s = spinner();
|
|
424
424
|
s.start('Fetching secrets from AWS...');
|
|
425
|
+
let remoteFetched = false;
|
|
425
426
|
|
|
426
427
|
try {
|
|
427
428
|
const targetRegion = await resolveSecretsRegion(opts);
|
|
@@ -443,6 +444,7 @@ async function pullSecretsMain(envFilePath, projectName, options = {}) {
|
|
|
443
444
|
}
|
|
444
445
|
const remoteKeys = Object.keys(remoteSecrets);
|
|
445
446
|
s.stop('Remote secrets fetched.');
|
|
447
|
+
remoteFetched = true;
|
|
446
448
|
|
|
447
449
|
const envPath = path.resolve(process.cwd(), resolvedFilePath);
|
|
448
450
|
let localSecrets = {};
|
|
@@ -521,6 +523,10 @@ async function pullSecretsMain(envFilePath, projectName, options = {}) {
|
|
|
521
523
|
console.log(`Run ${color.cyan(`npx grada-run secrets push ${resolvedFilePath}`)} first to upload your environment variables.\n`);
|
|
522
524
|
} else if (handleAuthErrorBranch(error, s, opts)) {
|
|
523
525
|
return;
|
|
526
|
+
} else if (remoteFetched) {
|
|
527
|
+
// The spinner already stopped, so its stop is a no-op —
|
|
528
|
+
// route the message through the failure stamp instead.
|
|
529
|
+
return failCommand({ message: `❌ Failed to pull secrets: ${error.message}`, exitCode: 1 });
|
|
524
530
|
} else {
|
|
525
531
|
s.stop(`❌ Failed to pull secrets: ${error.message}`);
|
|
526
532
|
}
|