Skip to content

Commit 6e0a605

Browse files
committed
Fix proxy.setup always running after meteor.setup
1 parent ffa9910 commit 6e0a605

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/plugins/default/command-handlers.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,8 @@ export function setup(api) {
3333
});
3434

3535
log('exec => mup setup');
36-
const config = api.getConfig();
3736

38-
return api.runCommand('docker.setup')
39-
.then(() => {
40-
if (config.proxy) {
41-
return api.runCommand('proxy.setup');
42-
}
43-
});
37+
return api.runCommand('docker.setup');
4438
}
4539

4640
export function start() {

src/plugins/proxy/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ export const hooks = {
3434
if (api.getConfig().proxy) {
3535
api.runCommand('proxy.status');
3636
}
37+
},
38+
'post.meteor.setup'(api) {
39+
// Only run hook on "mup setup"
40+
const dockerSetup = api.commandHistory.find(({ name }) => name === 'default.setup');
41+
42+
if (api.getConfig().proxy && dockerSetup) {
43+
return api.runCommand('proxy.setup');
44+
}
3745
}
3846
};
3947

0 commit comments

Comments
 (0)