Skip to content

Commit

Permalink
Debug fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
dpogue committed Jul 30, 2023
1 parent cf751bb commit 05127b6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/seymour.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ function run(args, env) {
return Promise.resolve();
}

var projectRoot = cordova.findProjectRoot();
var projectRoot = cordova.findProjectRoot(process.cwd());
if (!projectRoot) {
return Promise.reject(new CordovaError(`Current working directory is not a Cordova-based project: ${process.cwd()}`));
return Promise.reject(new CordovaError('Current working directory is not a Cordova-based project: ' + process.cwd()));
}

var logger = CordovaLogger.get();
Expand Down
9 changes: 9 additions & 0 deletions test/seymour.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ test('bad project', function(t) {
});
});

test('hack project detection', function(t) {
var fs = require('node:fs');
var dir = process.cwd();

assert.ok(fs.existsSync(path.join(dir, 'www')), 'www dir exists');
assert.ok(fs.existsSync(path.join(dir, 'config.xml')), 'config.xml exists');
assert.ok(fs.existsSync(path.join(dir, 'platforms')), 'platforms dir exists');
});


test('no parameters', function(t) {
var logger = CordovaLogger.get();
Expand Down

0 comments on commit 05127b6

Please sign in to comment.