Skip to content
This repository was archived by the owner on Aug 17, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var exec = require('child_process').exec;
var program = require('commander');
var notifier = require('node-notifier');

var pwd = require('process').env.PWD;
var pwd = require('process').env.PWD || require('process').cwd();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cwd() works on any platform, correct? If so, we could just assign to that...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

depends on the use-case. PWD is just the env variable which can be overwritten but cwd() returns the real current working directory. and yes, it works on all platforms.

var project = require('path').posix.basename(pwd);
var errorIcon = __dirname + '/error.png';
var defaultWatchFiles = ['phpunit.xml.dist', 'phpcs.xml', 'src/**/*.php', 'test/**/*.php'];
Expand Down