REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.58 KB
Close
//opt/alt/alt-nodejs22/root/usr/lib/node_modules/npm/node_modules/@npmcli/git/lib/opts.js
Text
Base64
const fs = require('node:fs') const os = require('node:os') const path = require('node:path') const ini = require('ini') const gitConfigPath = path.join(os.homedir(), '.gitconfig') let cachedConfig = null // Function to load and cache the git config const loadGitConfig = () => { if (cachedConfig === null) { try { cachedConfig = {} if (fs.existsSync(gitConfigPath)) { const configContent = fs.readFileSync(gitConfigPath, 'utf-8') cachedConfig = ini.parse(configContent) } } catch (error) { cachedConfig = {} } } return cachedConfig } const checkGitConfigs = () => { const config = loadGitConfig() return { sshCommandSetInConfig: config?.core?.sshCommand !== undefined, askPassSetInConfig: config?.core?.askpass !== undefined, } } const sshCommandSetInEnv = process.env.GIT_SSH_COMMAND !== undefined const askPassSetInEnv = process.env.GIT_ASKPASS !== undefined const { sshCommandSetInConfig, askPassSetInConfig } = checkGitConfigs() // Values we want to set if they're not already defined by the end user // This defaults to accepting new ssh host key fingerprints const finalGitEnv = { ...(askPassSetInEnv || askPassSetInConfig ? {} : { GIT_ASKPASS: 'echo', }), ...(sshCommandSetInEnv || sshCommandSetInConfig ? {} : { GIT_SSH_COMMAND: 'ssh -oStrictHostKeyChecking=accept-new', }), } module.exports = (opts = {}) => ({ stdioString: true, ...opts, shell: false, env: opts.env || { ...finalGitEnv, ...process.env }, }) // Export the loadGitConfig function for testing module.exports.loadGitConfig = loadGitConfig
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 13
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
clone.js
4.82 KB
lrw-r--r--
2026-02-23 06:54:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
errors.js
579 B
lrw-r--r--
2026-02-23 06:54:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
find.js
316 B
lrw-r--r--
2026-02-23 06:54:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
242 B
lrw-r--r--
2026-02-23 06:54:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
is-clean.js
222 B
lrw-r--r--
2026-02-23 06:54:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
is.js
216 B
lrw-r--r--
2026-02-23 06:54:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
lines-to-revs.js
3.97 KB
lrw-r--r--
2026-02-23 06:54:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
make-error.js
861 B
lrw-r--r--
2026-02-23 06:54:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
opts.js
1.58 KB
lrw-r--r--
2026-02-23 06:54:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
revs.js
521 B
lrw-r--r--
2026-02-23 06:54:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
spawn.js
1.27 KB
lrw-r--r--
2026-02-23 06:54:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.js
109 B
lrw-r--r--
2026-02-23 06:54:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
which.js
339 B
lrw-r--r--
2026-02-23 06:54:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).