Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

If there's a user/group issue, the openSync() call could fail. Try to…

… log it.
  • Loading branch information...
commit b4ad45ad1adb4a77ee6bdd98334afcd5242a4337 1 parent d8a8463
Dan Bornstein authored
Showing with 10 additions and 2 deletions.
  1. +9 −1 lib/index.js
  2. +1 −1  package.json
View
10 lib/index.js
@@ -215,7 +215,15 @@ function setLogDir(dir) {
var logFileName = path.join(dir, ERROR_LOG_NAME);
mkdirsIfNeeded(dir);
- logFile = fs.openSync(logFileName, "a");
+
+ try {
+ logFile = fs.openSync(logFileName, "a");
+ } catch (ex) {
+ // Attempt to log the problem.
+ console.log(ex.stack);
+ console.info(ex.stack);
+ throw ex;
+ }
fs.writeSync(logFile, "\n\n[Restarting log at " + new Date() + ".]\n");
View
2  package.json
@@ -1,6 +1,6 @@
{
"name": "daemonsauce",
- "version": "0.3.1",
+ "version": "0.3.2",
"description": "Just add Daemon Sauce to make yourself a daemon.",
"keywords": ["daemon", "init", "upstart"],
"author": {
Please sign in to comment.
Something went wrong with that request. Please try again.