Skip to content

Commit

Permalink
fix(publish_yalc): Check if directory/.git exists, not just directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherthielen committed Dec 28, 2017
1 parent 3710c6a commit 0db29b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion publish_yalc_package.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const util = require('./util');

const ORIG_DIR = process.cwd();
Expand All @@ -9,7 +10,7 @@ function publishYalcPackage(installDir, githubUrl) {
throw new Error('Usage: publish_yalc_package [INSTALL_DIR] [GITHUB_URL]');
}

if (!fs.existsSync(installDir)) {
if (!fs.existsSync(path.join(installDir, '.git'))) {
util._exec('git clone '+ githubUrl + ' ' + installDir);
}

Expand Down

0 comments on commit 0db29b7

Please sign in to comment.