File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed
packages/varlock/src/env-graph/lib Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " varlock " : patch
3+ ---
4+
5+ use process.cwd() instead of process.env.PWD
Original file line number Diff line number Diff line change @@ -2,15 +2,6 @@ import _ from '@env-spec/utils/my-dash';
22import { EnvGraph } from './env-graph' ;
33import { DirectoryDataSource } from './data-source' ;
44
5- function autoDetectBasePath ( ) {
6- const PWD = process . env . PWD ;
7- if ( ! PWD ) {
8- throw new Error ( 'PWD is not set' ) ;
9- }
10- return PWD ;
11- }
12-
13-
145export async function loadEnvGraph ( opts ?: {
156 basePath ?: string ,
167 relativePaths ?: Array < string > ,
@@ -20,7 +11,7 @@ export async function loadEnvGraph(opts?: {
2011 afterInit ?: ( graph : EnvGraph ) => Promise < void > ,
2112} ) {
2213 const graph = new EnvGraph ( ) ;
23- graph . basePath = opts ?. basePath ?? autoDetectBasePath ( ) ;
14+ graph . basePath = opts ?. basePath ?? process . cwd ( ) ;
2415
2516 if ( opts ?. afterInit ) {
2617 await opts . afterInit ( graph ) ;
You can’t perform that action at this time.
0 commit comments