(config, configPath)
| 161 | * @param configPath |
| 162 | */ |
| 163 | const 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 |
no test coverage detected