MCPcopy Create free account
hub / github.com/serverless/serverless / saveRcFile

Function saveRcFile

packages/util/src/rc/index.js:163–172  ·  view source on GitHub ↗
(config, configPath)

Source from the content-addressed store, hash-verified

161 * @param configPath
162 */
163const saveRcFile = async (config, configPath) => {
164 config.meta = config.meta || {}
165 config.meta.updated_at = Math.round(Date.now() / 1000)
166 const jsonConfig = JSON.stringify(config, null, 2)
167 try {
168 await writeFile(configPath, jsonConfig)
169 } catch (error) {
170 /** Empty Catch */
171 }
172}
173
174/**
175 * Creates a default .{baseFilename}rc file in the user's default home directory

Callers 6

saveRcAuthenticatedUserFunction · 0.90
saveRcAccessKeyV2Function · 0.90
removeRcUserSessionFunction · 0.90
removeRcAccessKeyV2Function · 0.90

Calls 1

writeFileFunction · 0.70

Tested by

no test coverage detected