Skip to content

Commit

Permalink
find binary from PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
KeenS committed Oct 29, 2018
1 parent 9898e91 commit f461c50
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.3.3

* find docker binary from path
+ was fixed to `/usr/bin/docker`
+ resolve errors on macOS and other platforms

# 0.3.2

* add `--no-build` option
Expand Down
13 changes: 12 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Sunrin SHIMURA (keen) <[email protected]>"]
name = "cargo-pack-docker"
version = "0.3.2"
version = "0.3.3"
description = "pack artifacts into a docker image"
repository = "https://github.com/KeenS/cargo-pack-docker"
license = "MIT/Apache-2.0"
Expand All @@ -23,3 +23,4 @@ cargo-pack = "0.4.0"
serde_derive = "1.0.28"
failure = "0.1.1"
failure_derive = "0.1.1"
which = "2.0.0"
3 changes: 2 additions & 1 deletion src/docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ impl<'cfg> Docker<'cfg> {
fn build<P: AsRef<Path>>(&self, path: P, pack_docker: &PackDocker) -> Result<()> {
let image_tag = pack_docker.tag(self)?;
// FIXME: take from user
let status = Command::new("/usr/bin/docker")
let dockerbin = ::which::which("/usr/bin/docker")?;
let status = Command::new(dockerbin)
.current_dir(&path)
.arg("build")
.arg(path.as_ref().to_str().unwrap())
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ extern crate tempdir;
extern crate failure;
#[macro_use]
extern crate failure_derive;
extern crate which;

mod docker;
pub use docker::*;
Expand Down

0 comments on commit f461c50

Please sign in to comment.