Skip to content

Commit bc89b23

Browse files
committedMar 1, 2023
run DC build with an optional --pull (lando#31)
1 parent 86a9726 commit bc89b23

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed
 

‎lib/compose.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const buildShell = (run, name, compose, opts = {}) => ({
7777
* Run docker compose build
7878
*/
7979
exports.build = (compose, project, opts = {}) => {
80-
return buildShell('build', project, compose, {pull: _.isEmpty(opts.local)});
80+
return buildShell('build', project, compose, {pull: _.isEmpty(opts.pullable) || _.isEmpty(opts.local)});
8181
};
8282

8383
/*

‎lib/router.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ exports.eventWrapper = (name, daemon, events, data, run) => daemon.up()
3030
* Helper to route to build command
3131
*/
3232
exports.build = (data, compose) => {
33-
// Pull
34-
return retryEach(data, datum => compose('pull', datum))
35-
// then build
36-
.then(() => retryEach(data, datum => compose('build', datum)));
33+
// Build (with optional "--pull")
34+
return retryEach(data, datum => compose('build', datum));
3735
};
3836

3937
/*

0 commit comments

Comments
 (0)