diff --git a/README.md b/README.md index ee68dcf..da89042 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +> This utility is **exactly** the same as [breser/git2consul](https://github.com/breser/git2consul) but it includes a small patch that fixes a crash on Windows. + # git2consul [![Build Status](https://travis-ci.org/breser/git2consul.svg?branch=master)](https://travis-ci.org/breser/git2consul) diff --git a/lib/utils.js b/lib/utils.js index 5f35785..6b87668 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -12,7 +12,8 @@ module.exports.validate_writeable_directory = function(dir) { } // Check whether this owner or group or anyone is allowed to write the directory. - var can_write = ((process.getuid() === stat.uid) && (stat.mode & 00200)) || // User is owner and owner can write. + var can_write = (!process.getuid) || // process.getuid() does not exist on windows + ((process.getuid() === stat.uid) && (stat.mode & 00200)) || // User is owner and owner can write. ((process.getgid() === stat.gid) && (stat.mode & 00020)) || // User is in group and group can write. ((stat.mode & 00002)); // Anyone can write. if (!can_write) { diff --git a/package.json b/package.json index 5feb215..536b177 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,21 @@ { - "name": "git2consul", + "name": "git2consul-windows", "description": "System for moving data from git to consul", "license": "Apache-2.0", - "version": "0.12.13", + "version": "0.12.14", "contributors": [ { "name": "Ryan Breen", "email": "rbreen@cimpress.com" + }, + { + "name": "Andri Rakotomalala", + "email": "andriniaina@gmail.com" } ], "repository": { "type": "git", - "url": "git://github.com/Cimpress-MCP/git2consul.git" + "url": "git://github.com/andriniaina/git2consul-windows.git" }, "dependencies": { "body-parser": "~1.4.3",