From 74fee15bc1b6c3c558bab72a644b2600c91d0d2d Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Fri, 12 Apr 2013 12:49:11 -0700 Subject: [PATCH] Tidy --- src/librustpkg/rustpkg.rc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/librustpkg/rustpkg.rc b/src/librustpkg/rustpkg.rc index 24c37d255895..399fcec68040 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())); }