@wchen.ai/env-from-example 1.0.0 → 1.0.1
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/dist/env-from-example.js +4 -1
- package/package.json +1 -1
package/dist/env-from-example.js
CHANGED
|
@@ -400,7 +400,10 @@ async function run() {
|
|
|
400
400
|
}
|
|
401
401
|
// ─── Entry ───────────────────────────────────────────────────────────────────
|
|
402
402
|
const __filename = fileURLToPath(import.meta.url);
|
|
403
|
-
const
|
|
403
|
+
const resolvedArgv = process.argv[1]
|
|
404
|
+
? fs.realpathSync(path.resolve(process.argv[1]))
|
|
405
|
+
: "";
|
|
406
|
+
const isMain = resolvedArgv === fs.realpathSync(path.resolve(__filename));
|
|
404
407
|
if (isMain) {
|
|
405
408
|
run().catch((err) => {
|
|
406
409
|
if (err &&
|