File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ const {
4747 validateObject,
4848} = require ( 'internal/validators' ) ;
4949const { getValidatedPath } = require ( 'internal/fs/utils' ) ;
50- const { toNamespacedPath } = require ( 'path' ) ;
5150const constants = internalBinding ( 'constants' ) . os . signals ;
5251
5352const kInternal = Symbol ( 'internal properties' ) ;
@@ -255,7 +254,7 @@ function wrapProcessMethods(binding) {
255254 function loadEnvFile ( path = undefined ) { // Provide optional value so that `loadEnvFile.length` returns 0
256255 if ( path != null ) {
257256 path = getValidatedPath ( path ) ;
258- _loadEnvFile ( toNamespacedPath ( path ) ) ;
257+ _loadEnvFile ( path ) ;
259258 } else {
260259 _loadEnvFile ( ) ;
261260 }
Original file line number Diff line number Diff line change 99#include " node_external_reference.h"
1010#include " node_internals.h"
1111#include " node_process-inl.h"
12+ #include " path.h"
1213#include " util-inl.h"
1314#include " uv.h"
1415#include " v8-fast-api-calls.h"
@@ -474,7 +475,8 @@ static void LoadEnvFile(const v8::FunctionCallbackInfo<v8::Value>& args) {
474475 Environment* env = Environment::GetCurrent (args);
475476 std::string path = " .env" ;
476477 if (args.Length () == 1 ) {
477- Utf8Value path_value (args.GetIsolate (), args[0 ]);
478+ BufferValue path_value (args.GetIsolate (), args[0 ]);
479+ ToNamespacedPath (env, &path_value);
478480 path = path_value.ToString ();
479481 }
480482
You can’t perform that action at this time.
0 commit comments