MCPcopy
hub / github.com/toddbluhm/env-cmd / resolveEnvFilePath

Function resolveEnvFilePath

src/utils.ts:20–27  ·  view source on GitHub ↗
(userPath: string)

Source from the content-addressed store, hash-verified

18 * A simple function for resolving the path the user entered
19 */
20export function resolveEnvFilePath(userPath: string): string {
21 // Make sure a home directory exist
22 const home = homedir() as string | undefined
23 if (home != null) {
24 userPath = userPath.replace(/^~($|\/|\\)/, `${home}$1`)
25 }
26 return resolve(cwd(), userPath)
27}
28/**
29 * A simple function that parses a comma separated string into an array of strings
30 */

Callers 3

utils.spec.tsFile · 0.85
getRCFileVarsFunction · 0.85
getEnvFileVarsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected