Skip to content
Closed
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
1 change: 1 addition & 0 deletions dag/extdeps/exec/command.dag
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ fn argv_command(program: NonEmptyStr, arguments: List<String>) -> ArgvCommand
decl_ref(module_path: "extdeps.tools.gnu_coreutils", decl_name: "true_command"),
decl_ref(module_path: "extdeps.tools.gnu_coreutils", decl_name: "whoami_command"),
decl_ref(module_path: "extdeps.tools.gnu_coreutils", decl_name: "readlink_command"),
decl_ref(module_path: "extdeps.tools.gnu_coreutils", decl_name: "ls_one_per_line_command"),
decl_ref(module_path: "extdeps.tools.findutils", decl_name: "find_symlink_target_glob_command"),
decl_ref(module_path: "extdeps.tools.chmod", decl_name: "chmod_set_mode_command"),
decl_ref(module_path: "extdeps.tools.stat", decl_name: "stat_owner_user_name_command"),
Expand Down
10 changes: 10 additions & 0 deletions dag/extdeps/tools/gnu_coreutils.dag
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ data printf_program: NonEmptyStr = "printf"
data true_program: NonEmptyStr = "true"
data whoami_program: NonEmptyStr = "whoami"
data readlink_program: NonEmptyStr = "readlink"
data ls_program: NonEmptyStr = "ls"

fn cat_command(path: String) -> ArgvCommand {
argv_command(program: cat_program, arguments: [path])
Expand Down Expand Up @@ -81,6 +82,15 @@ fn readlink_command(path: String) -> ArgvCommand {
argv_command(program: readlink_program, arguments: [path])
}

// -1 ALONE, NEVER -la OR A GLOB. One entry per line is what makes the output parseable as a list
// of names; a long listing would put mode, owner and size in front of every name and force the
// caller to re-parse them out. The directory is the operand, so an out-of-band entry -- one nobody
// desired -- is listed like any other, which is what keeps an observed population independent of
// the desired one.
fn ls_one_per_line_command(directory: String) -> ArgvCommand {
argv_command(program: ls_program, arguments: ["-1", directory])
}

// install(1) — GNU coreutils, "Setting file attributes" / install invocation. The flags used
// here are the ones that manual defines: -d creates each named directory, -m sets the mode,
// -o and -g set owner and group at creation. Owner-at-creation is why this repository installs
Expand Down
4 changes: 2 additions & 2 deletions dag/gunbc/runner_slot_provision.dag
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import gunbc.command_runner {
run_shell_command_capture,
LocalExec,
}
import extdeps.exec.command { ArgvCommand }
import extdeps.tools.gnu_coreutils { ls_one_per_line_command }

// RunnerSlotProvision owns runner installation end-to-end in gunbc (operator ruling 2026-08-06:
// ctrl is a dead repo; prior ctrl:install-actions-runner citations are void legacy pointers).
Expand Down Expand Up @@ -237,7 +237,7 @@ func observe_runner_slot_members_wet() -> RunnerSlotObservation
uses net: Network
{
match run_shell_command_capture(
command: ArgvCommand { argv: ["ls", "-1", actions_runner_base_dir] },
command: ls_one_per_line_command(directory: actions_runner_base_dir),
transport: LocalExec,
) {
ProcessRefused { exit_code: code, stderr: err } =>
Expand Down
Loading