8000 feat(minimald): initial, shitty impl of task execution by twitchyliquid64 · Pull Request #338 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
remove_android: true
remove_dotnet: true
remove_haskell: true
remove_tool_cache: true
remove_packages: "azure-cli dotnet-sdk-8.0 temurin-* mysql* firefox"
- uses: actions/checkout@v6
- name: Install protoc
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
Expand Down
7 changes: 7 additions & 0 deletions Cargo.lock

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

28 changes: 15 additions & 13 deletions crates/mctx/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -737,24 +737,26 @@ impl<'a> Env<'a> {
),
)]
.into_iter();
let var_ctx = if let Some(args) = parsed_args {
common::ncl_eval::VarCtx::from_iter(
base.chain(args.iter().map(|(k, v)| (k.as_str(), v.clone()))),
)
} else {
common::ncl_eval::VarCtx::from_iter(base)
let mapped_task = {
let var_ctx = if let Some(args) = parsed_args {
common::ncl_eval::VarCtx::from_iter(
base.chain(args.iter().map(|(k, v)| (k.as_str(), v.clone()))),
)
} else {
common::ncl_eval::VarCtx::from_iter(base)
};
task.map_exec_strings(|s| {
var_ctx
.eval_string(s)
.map_err(|_| anyhow::anyhow!("nickel eval failed for string: {}", s))
})
.map_err(Error::Other)?
};

Ok((
task.interactive,
op::TaskEnv {
task: &task
.map_exec_strings(|s| {
var_ctx
.eval_string(s)
.map_err(|_| anyhow::anyhow!("nickel eval failed for string: {}", s))
})
.map_err(Error::Other)?,
task: &mapped_task,
sandbox: &mut self.sandbox,
}
.resolve()
Expand Down
7 changes: 7 additions & 0 deletions crates/minimald/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ clap.workspace = true
clap_complete.workspace = true
constcat.workspace = true
dirs.workspace = true
futures.workspace = true
hakoniwa.workspace = true
libc.workspace = true
russh.workspace = true
russh-sftp.workspace = true
path-absolutize.workspace = true
Expand All @@ -20,6 +23,10 @@ tokio.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true

args.workspace = true
graph.workspace = true
mctx.workspace = true
mfile.workspace = true
ot.workspace = true
paths.workspace = true
sessions.workspace = true
Expand Down
Loading
Loading
0