Skip to content

Commit

Permalink
fix(): ensure that the project base directory is passed to setupLiveR…
Browse files Browse the repository at this point in the history
…eload. fixes #1034
  • Loading branch information
jthoms1 committed Jun 6, 2016
1 parent 53bcbbb commit f36acef
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/ionic/emulate.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ function run(ionic, argv, rawCliArguments) {

return Q.all(promiseList).then(function() {
if (isLiveReload) {
return cordovaUtils.setupLiveReload(argv);
return cordovaUtils.setupLiveReload(argv, appDirectory);
}

// ensure the content node was set back to its original
return ConfigXml.setConfigXml(process.cwd(), {
return ConfigXml.setConfigXml(appDirectory, {
resetContent: true,
errorWhenNotFound: false
});
Expand Down
4 changes: 2 additions & 2 deletions lib/ionic/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ function run(ionic, argv, rawCliArguments) {

return Q.all(promiseList).then(function() {
if (isLiveReload) {
return cordovaUtils.setupLiveReload(argv);
return cordovaUtils.setupLiveReload(argv, appDirectory);
}

// ensure the content node was set back to its original
return ConfigXml.setConfigXml(process.cwd(), {
return ConfigXml.setConfigXml(appDirectory, {
resetContent: true,
errorWhenNotFound: false
});
Expand Down
2 changes: 1 addition & 1 deletion spec/tasks/emulate.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ describe('emulate command', function() {
spyOn(cordovaUtils, 'execCordovaCommand').andReturn(Q(true));

emulate.run(null, argv, rawCliArguments).then(function() {
expect(cordovaUtils.setupLiveReload).toHaveBeenCalledWith(argv);
expect(cordovaUtils.setupLiveReload).toHaveBeenCalledWith(argv. appDirectory);
expect(cordovaUtils.execCordovaCommand).toHaveBeenCalledWith(
['emulate', 'android'], true, { blah: 'blah' });
done();
Expand Down
2 changes: 1 addition & 1 deletion spec/tasks/run.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ describe('run command', function() {
}));

run.run(null, argv, rawCliArguments).then(function() {
expect(cordovaUtils.setupLiveReload).toHaveBeenCalledWith(argv);
expect(cordovaUtils.setupLiveReload).toHaveBeenCalledWith(argv, appDirectory);
expect(cordovaUtils.execCordovaCommand).toHaveBeenCalledWith(
['run', 'android'], true, { blah: 'blah' });
done();
Expand Down

0 comments on commit f36acef

Please sign in to comment.