@karmaniverous/get-dotenv 0.1.1 → 0.1.3

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.
@@ -65,7 +65,7 @@ const {
65
65
  variable,
66
66
  } = program.opts();
67
67
 
68
- if (command && program.args) program.error('command specified twice');
68
+ if (command && program.args.length) program.error('command specified twice');
69
69
 
70
70
  // Get environment.
71
71
  const env = environment ?? process.env[variable] ?? defaultEnvironment;
@@ -83,8 +83,10 @@ getDotenvSync({
83
83
  });
84
84
 
85
85
  // Execute shell command.
86
- if (command || program.args) {
87
- const argv = program.args ?? parseArgsStringToArgv(command);
86
+ if (command || program.args.length) {
87
+ const argv = program.args.length
88
+ ? program.args
89
+ : parseArgsStringToArgv(command);
88
90
 
89
91
  spawn(argv[0], argv.slice(1), { stdio: 'inherit' }).on(
90
92
  'exit',
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "bin": {
4
4
  "getdotenv": "bin/getdotenv/index.js"
5
5
  },
6
- "version": "0.1.1",
6
+ "version": "0.1.3",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },