Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions package/pbt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ description = """\
Python Build Tool: A BusyBox that provides `python`, `pip`, `pex`, `pex3` and `pex-tools`.\
"""

# Downloader tool
# https://github.com/a-scie/ptex
[lift.ptex]
version = "0.7.0"
version = "1.6.1"

# SCIE launcher
# https://github.com/a-scie/jump
[lift.scie_jump]
version = "0.14.0"
version = "1.7.0"

[[lift.interpreters]]
id = "cpython"
Expand Down
8 changes: 6 additions & 2 deletions package/scie-pants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ load_dotenv = true
[lift.app_info]
repo = "https://github.com/pantsbuild/scie-pants"

# Downloader tool
# https://github.com/a-scie/ptex
[lift.ptex]
id = "ptex"
version = "0.7.0"
version = "1.6.1"
argv1 = "{scie.env.PANTS_BOOTSTRAP_URLS={scie.lift}}"

# SCIE launcher
# https://github.com/a-scie/jump
[lift.scie_jump]
version = "0.14.0"
version = "1.7.0"

[[lift.interpreters]]
id = "cpython38"
Expand Down
4 changes: 2 additions & 2 deletions package/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ use crate::utils::fs::{base_name, canonicalize, copy, ensure_directory};

const BINARY: &str = "scie-pants";

// The version of a-scie/lift to use by default.
const SCIENCE_TAG: &str = "v0.11.2";
/// The version of [lift](https://github.com/a-scie/lift) to use by default.
const SCIENCE_TAG: &str = "v0.12.2";

#[derive(Clone)]
struct SpecifiedPath(PathBuf);
Expand Down
1 change: 1 addition & 0 deletions package/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ enum ExpectedResult {
Failure,
}

#[track_caller]
fn assert_stderr_output(
command: &mut Command,
expected_messages: Vec<&str>,
Expand Down
16 changes: 15 additions & 1 deletion package/src/utils/exe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use std::process::{Command, Output};
use anyhow::{bail, Context, Result};
use lazy_static::lazy_static;
use log::info;
use regex::Regex;

use super::os::EOL;

Expand Down Expand Up @@ -124,7 +125,20 @@ fn _execute_with_input(command: &mut Command, stdin_data: Option<&[u8]>) -> Resu
message_lines.push("STDERR:".to_string());
message_lines.push(String::from_utf8_lossy(output.stderr.as_slice()).to_string());
}
bail!(message_lines.join(EOL));

let mut message_lines = message_lines.join(EOL);
let log_re = Regex::new(r"\W?(/[a-zA-Z0-9./]+)\W?").expect("compile log_re");

for m in log_re.captures_iter(&message_lines.clone()) {
let maybe_path = m.get(1).unwrap().as_str();
if maybe_path.ends_with(".log") {
let log_contents = std::fs::read_to_string(maybe_path).expect("read log file");
message_lines.push_str(&format!("LOG {maybe_path}{EOL}"));
message_lines.push_str(&log_contents);
}
}

bail!(message_lines);
}
Ok(output)
}
Expand Down
Loading