Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

Commit

Permalink
Backwards compat for Node v4
Browse files Browse the repository at this point in the history
  • Loading branch information
DaneEveritt committed Feb 16, 2017
1 parent fc3c29e commit ff9fab1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/diagnostics.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Inquirer.prompt([
]).then(answers => {
Async.auto({
config: callback => {
Fs.access('./config/core.json', Fs.constants.R_OK | Fs.constants.W_OK, err => { // eslint-disable-line
Fs.access('./config/core.json', (Fs.constants || Fs).R_OK | (Fs.constants || Fs).W_OK, err => { // eslint-disable-line
if (err) return callback(null, { error: true });
return callback(null, Fs.readJsonSync('./config/core.json'));
});
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class Pack {
this.logger.debug('Checking if pack needs to be updated.');
Async.auto({
file_exists: callback => {
Fs.access(this.archiveLocation, Fs.constants.R_OK, err => {
Fs.access(this.archiveLocation, (Fs.constants || Fs).R_OK, err => {
if (err && err.code === 'ENOENT') {
return callback(null, false);
}
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/timezone.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ class TimezoneHelper {

Async.parallel({
is_timezone: callback => {
Fs.access('/etc/timezone', Fs.constants.F_OK, err => {
Fs.access('/etc/timezone', (Fs.constants || Fs).F_OK, err => {
callback(null, (!err));
});
},
is_localtime: callback => {
Fs.access('/etc/localtime', Fs.constants.F_OK, err => {
Fs.access('/etc/localtime', (Fs.constants || Fs).F_OK, err => {
callback(null, (!err));
});
},
Expand Down

0 comments on commit ff9fab1

Please sign in to comment.