@karmaniverous/get-dotenv 2.6.2 → 2.6.4

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.
@@ -146,10 +146,7 @@ await getDotenv({
146
146
  });
147
147
 
148
148
  // Get AWS SSO credentials.
149
- if (awsSsoProfile) {
150
- const profile = dotenvExpand(awsSsoProfile);
151
- if (profile) getAwsSsoCredentials(profile);
152
- }
149
+ if (awsSsoProfile) getAwsSsoCredentials(dotenvExpand(awsSsoProfile));
153
150
 
154
151
  // Execute shell command.
155
152
  if (command || program.args.length) {
@@ -9,7 +9,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
9
9
  // npm imports
10
10
 
11
11
  const getAwsSsoCredentials = localProfile => {
12
- if (!localProfile) {
12
+ if (!localProfile?.length) {
13
13
  delete process.env.AWS_ACCESS_KEY_ID;
14
14
  delete process.env.AWS_SECRET_ACCESS_KEY;
15
15
  delete process.env.AWS_SESSION_TOKEN;
@@ -2,7 +2,7 @@
2
2
  import spawn from 'cross-spawn';
3
3
 
4
4
  export const getAwsSsoCredentials = (localProfile) => {
5
- if (!localProfile) {
5
+ if (!localProfile?.length) {
6
6
  delete process.env.AWS_ACCESS_KEY_ID;
7
7
  delete process.env.AWS_SECRET_ACCESS_KEY;
8
8
  delete process.env.AWS_SESSION_TOKEN;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "bin": {
4
4
  "getdotenv": "bin/getdotenv/index.js"
5
5
  },
6
- "version": "2.6.2",
6
+ "version": "2.6.4",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },