Skip to content

Commit 074b471

Browse files
committed
fixes
Signed-off-by: Pierre Fenoll <[email protected]>
1 parent a209247 commit 074b471

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

rustcbuildx/src/base.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl BaseImage {
2525
#[must_use]
2626
pub(crate) fn base(&self) -> String {
2727
match self {
28-
Self::Image(img) => img.trim_start_matches("docker-image://").to_owned(),
28+
Self::Image(img) => img.clone(),
2929
Self::RustcV(RustcV { base, .. }) if base.is_empty() => {
3030
"docker.io/library/debian:12-slim".to_owned()
3131
}
@@ -43,6 +43,7 @@ impl BaseImage {
4343

4444
pub(crate) fn block(&self) -> String {
4545
let base = self.base();
46+
let base = base.trim_start_matches("docker-image://");
4647

4748
if let BaseImage::RustcV(RustcV { version, commit, date, channel, .. }) = self {
4849
log::trace!("{version} + {commit}");

rustcbuildx/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ async fn do_wrap_rustc(
364364

365365
let rustc_stage = input.to_string().replace(['/', '.'], "-");
366366
let rustc_stage = Stage::new(format!("cwd-{crate_id}-{rustc_stage}"))?;
367+
// let rustc_stage = Stage::new("cwd")?;
367368
(None, rustc_stage)
368369
} else {
369370
bail!("Unexpected input file {input:?}")

rustcbuildx/src/md.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ impl Md {
6464
if visited.insert(name.to_owned()) {
6565
dockerfile.push_str(script);
6666
}
67+
} else {
68+
// Otherwise, write it back in
69+
dockerfile.push_str(script);
6770
}
71+
6872
for DockerfileStage { name, script } in stages {
6973
if name == filter {
7074
continue;

0 commit comments

Comments
 (0)