Skip to content

Commit

Permalink
Exempt CIs from key setting
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyman727 committed Nov 11, 2015
1 parent 55ee77e commit 295471d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/tessel/provision.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ actions.checkAuthFileExists = function(tessel, authFile) {

actions.setDefaultKey = function(keyPath) {
return new Promise(function(resolve, reject) {

// If this is being running through CI tests
if (global.IS_TEST_ENV) {
// Just resolve, we do not want to mess with CI filesystems
return resolve();
}

if (!keyPath) {
return reject('No key provided to set as default.');
}
Expand Down Expand Up @@ -221,7 +228,3 @@ util.inherits(AlreadyAuthenticatedError, Error);
actions.AlreadyAuthenticatedError = AlreadyAuthenticatedError;
module.exports = actions;
module.exports.TESSEL_AUTH_KEY = authKey;

if (global.IS_TEST_ENV) {
module.exports = actions;
}

0 comments on commit 295471d

Please sign in to comment.