(file)
| 5 | const argv = require('minimist')(process.argv.slice(2)); |
| 6 | |
| 7 | function restoreFile(file) { |
| 8 | const command = `git restore ${file}`; |
| 9 | console.log(`${command}`); |
| 10 | |
| 11 | exec(command, (error, stdout, stderr) => { |
| 12 | if (error) { |
| 13 | console.error(`error:${error.message}`); |
| 14 | return; |
| 15 | } |
| 16 | |
| 17 | if (stderr) { |
| 18 | console.error(`stderr:${stderr}`); |
| 19 | return; |
| 20 | } |
| 21 | }); |
| 22 | } |
| 23 | |
| 24 | function getFilesInDir(dir, extension) { |
| 25 | let filesList = []; |