UNPKG

internal-error

Version:

This gives internal error message based on error code

14 lines (13 loc) 623 B
const fs = require('fs'); const path = require('path'); const yaml = require('js-yaml'); const shell = require('shelljs'); let REPOSITORY_URL = "https://github.com/samsadeyemo/yamldir"; let FOLDER_TO_REMOVE = 'node_modules/internal-error/yamldir'; let FOLDER_TO_CREATE = 'node_modules/internal-error'; const directoryPathToRemove = path.join(__dirname,FOLDER_TO_REMOVE); fs.rmSync(directoryPathToRemove, { recursive: true, force: true }); const directoryPathToCreate = path.join(__dirname,FOLDER_TO_CREATE); shell.cd(directoryPathToCreate); shell.exec('git clone '+REPOSITORY_URL) ; console.log('internal-error updated!')