Skip to content

Commit

Permalink
build: Display exec commands on console.log for easier debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Braun authored and David Braun committed Apr 16, 2018
1 parent 8eaca3e commit 608768c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tasks/build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,16 @@ const path = require(`path`)
const shell = require(`shelljs`)
const untildify = require(`untildify`)

// Show the exec commands for easier debugging if something goes wrong.
const exec = (command, ...args) => {
console.log(command)
return shell.exec(command, ...args)
}

cli(optionsSpecification, options => {
const { commit, gaia, network } = options

shell.exec(`docker build --tag cosmos/voyager-builder .`, {
exec(`docker build --tag cosmos/voyager-builder .`, {
cwd: __dirname
})

Expand Down Expand Up @@ -41,7 +47,7 @@ cli(optionsSpecification, options => {
// default network
//
// output: the builds directory
shell.exec(`docker run \
exec(`docker run \
--interactive \
--mount type=bind,readonly,source=${resolved.gaia},target=/mnt/gaia \
--mount type=bind,readonly,source=${resolved.git},target=/mnt/.git \
Expand Down

0 comments on commit 608768c

Please sign in to comment.