Skip to content

make the cwd of RunStep take a Cache.Directory #14959

@andrewrk

Description

@andrewrk

Extracted from #14647.

/// Set this to modify the current working directory
/// TODO change this to a Build.Cache.Directory to better integrate with
/// future child process cwd API.
cwd: ?[]const u8,

if (self.cwd) |cwd| {
child.cwd = b.pathFromRoot(cwd);
} else {
child.cwd = b.build_root.path;
child.cwd_dir = b.build_root.handle;
}

/// Set to change the current working directory when spawning the child process.
cwd: ?[]const u8,
/// Set to change the current working directory when spawning the child process.
/// This is not yet implemented for Windows. See https://github.com/ziglang/zig/issues/5190
/// Once that is done, `cwd` will be deprecated in favor of this field.
cwd_dir: ?fs.Dir = null,

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingImplementing this issue could cause existing code to no longer compile or have different behavior.enhancementSolving this issue will likely involve adding new logic or components to the codebase.zig build systemstd.Build, the build runner, `zig build` subcommand, package management

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions