We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8200d4 commit 7961e47Copy full SHA for 7961e47
bin/aws-wrapper.js
@@ -0,0 +1,23 @@
1
+const cp = require('child_process');
2
+
3
+const args = process.argv.splice(3);
4
+const secretKey = process.env['AWS_SECRET_ACCESS_KEY'];
5
+const accessKey = process.env['AWS_ACCESS_KEY_ID'];
6
7
+if (!secretKey || !accessKey) {
8
+ console.log('AWS environment keys missing!');
9
+ return;
10
+}
11
12
+if (args.includes('--secret-access-key') || args.includes('--access-key')) {
13
+ console.log('AWS environment already given in CLI commands!');
14
+ console.log('Just call the script directly');
15
16
17
18
+args.push('--secret-access-key', secretKey);
19
+args.push('--access-key', accessKey);
20
21
+console.log(`Wrapping ${process.argv[2]} with arguments ${args}`)
22
23
+cp.fork(process.argv[2], args);
0 commit comments