diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2013-04-12 12:49:11 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2013-04-12 12:49:11 -0700 |
| commit | 74fee15bc1b6c3c558bab72a644b2600c91d0d2d (patch) | |
| tree | b54d8a301099c497699620f786a65b55c3ad3243 | |
| parent | 8158dd7e9a3469b8c0946035b457a953faf29d99 (diff) | |
| download | rust-74fee15bc1b6c3c558bab72a644b2600c91d0d2d.tar.gz rust-74fee15bc1b6c3c558bab72a644b2600c91d0d2d.zip | |
Tidy
| -rw-r--r-- | src/librustpkg/rustpkg.rc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/librustpkg/rustpkg.rc b/src/librustpkg/rustpkg.rc index 24c37d25589..399fcec6804 100644 --- a/src/librustpkg/rustpkg.rc +++ b/src/librustpkg/rustpkg.rc @@ -162,7 +162,6 @@ struct Ctx { fn dest_dir(pkgid: PkgId) -> Path { default_dest_dir(&pkgid.path).expect( ~"couldn't make default dir?!") - } /// Returns the default output directory for compilation. @@ -339,23 +338,21 @@ impl Ctx { // Always use the "build" subdirectory of the package dir, // but we should allow this to be configured let dst_dir = dest_dir(pkgid); - + let mut src = PkgSrc::new(cwd, &dst_dir, &pkgid); - match src.package_script_option(cwd) { Some(script_path) => { let script = PkgScript::parse(script_path, pkgid); let (_, status) = script.run_custom(cmd); // Ignore cfgs? if status == 42 { // ??? util::error(~"no fns are listening for that cmd"); - return false; } - status == 0 } None => { - util::error(fmt!("invoked `do`, but there is no package script in %s", cwd.to_str())); + util::error(fmt!("invoked `do`, but there is no package script in %s", + cwd.to_str())); false } } @@ -929,8 +926,8 @@ impl PkgSrc { dst_dir, crate.flags, crate.cfgs + cfgs, - false, test); - if !result { + false, test); + if !result { build_err::cond.raise(fmt!("build failure on %s", path.to_str())); } |
