From 6dffb4182afbead414002e687edc1e8f2a593152 Mon Sep 17 00:00:00 2001 From: Ayush Mukherjee Date: Fri, 20 Sep 2019 22:29:59 +0530 Subject: [PATCH] added basic checks for .git folder --- index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 index.js diff --git a/index.js b/index.js new file mode 100644 index 0000000..c3c46c9 --- /dev/null +++ b/index.js @@ -0,0 +1,16 @@ +const { platform, EOL } = require('os'); +const { execSync } = require('child_process'); + +const list_dir = () => { + if(platform == 'linux') { + return execSync("ls -lA | awk '{print $9}'") + .toString() + .split(EOL); + } + +} + +const m = list_dir().forEach((l) => { + if(l == '.git') + console.log(true); +});