New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dotenvx/dotenvx

Package Overview
Dependencies
Maintainers
2
Versions
188
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotenvx/dotenvx - npm Package Compare versions

Comparing version 1.22.1 to 1.22.2

8

CHANGELOG.md

@@ -5,4 +5,10 @@ # Changelog

## [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.22.1...main)
## [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.22.2...main)
## 1.22.2
### Changed
* more lenient handling of `--` separator and better error messaging when flags are ambiguous ([#438](https://github.com/dotenvx/dotenvx/pull/438))
## 1.22.1

@@ -9,0 +15,0 @@

2

package.json
{
"version": "1.22.1",
"version": "1.22.2",
"name": "@dotenvx/dotenvx",

@@ -4,0 +4,0 @@ "description": "a better dotenv–from the creator of `dotenv`",

@@ -16,2 +16,15 @@ const path = require('path')

if (commandArgs.length < 1) {
const hasSeparator = process.argv.indexOf('--') !== -1
if (hasSeparator) {
console.error('missing command after [dotenvx run --]. try [dotenvx run -- yourcommand]')
} else {
const realExample = options.envFile[0] || '.env'
console.error(`ambiguous command due to missing '--' separator. try [dotenvx run -f ${realExample} -- yourcommand]`)
}
process.exit(1)
}
try {

@@ -110,15 +123,5 @@ let envs = []

// Extract command and arguments after '--'
const commandIndex = process.argv.indexOf('--')
if (commandIndex === -1 || commandIndex === process.argv.length - 1) {
logger.error('missing command after [dotenvx run --]')
logger.error('')
logger.error(' get help: [dotenvx help run]')
logger.error(' or try: [dotenvx run -- npm run dev]')
process.exit(1)
} else {
await executeCommand(commandArgs, process.env)
}
await executeCommand(commandArgs, process.env)
}
module.exports = run

@@ -18,3 +18,3 @@ const run = function () {

$ dotenvx run -- node index.js
$ dotenvx run -f .env -- node index.js
[dotenvx] injecting env (1) from .env

@@ -21,0 +21,0 @@ Hello World

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc