MCPcopy Create free account
hub / github.com/Snapchat/Valdi / getRcFile

Method getRcFile

npm_modules/cli/src/setup/DevSetupHelper.ts:195–209  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

193 }
194
195 private getRcFile(): string | undefined {
196 const homeDir = process.env['HOME'] ?? '';
197 const shell = process.env['SHELL'] ?? '';
198 if (shell.endsWith('/zsh')) {
199 return path.join(homeDir, '.zshrc');
200 } else if (shell.endsWith('/bash')) {
201 return path.join(homeDir, '.bashrc');
202 } else if (shell.endsWith('/ksh')) {
203 return path.join(homeDir, '.kshrc');
204 } else if (shell.endsWith('/tcsh')) {
205 return path.join(homeDir, '.tcshrc');
206 } else {
207 return undefined;
208 }
209 }
210}

Callers 3

onCompleteMethod · 0.95

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected