mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 06:00:45 -06:00
actually use stdout
This commit is contained in:
parent
a160e2eccc
commit
7fc911b1a8
2 changed files with 6 additions and 4 deletions
|
@ -24,8 +24,10 @@ pub const OizysCmd = enum {
|
|||
pub fn init(allocator: std.mem.Allocator, matches: *const ArgMatches) !Oizys {
|
||||
const cmd = matches.subcommand.?.name;
|
||||
const flags = matches.subcommandMatches(cmd).?;
|
||||
const host = flags.getSingleValue("host") orelse try Oizys.getDefaultHostName(allocator);
|
||||
const flake = flags.getSingleValue("flake") orelse try Oizys.getDefaultFlake(allocator);
|
||||
const host = flags.getSingleValue("host") orelse
|
||||
try Oizys.getDefaultHostName(allocator);
|
||||
const flake = flags.getSingleValue("flake") orelse
|
||||
try Oizys.getDefaultFlake(allocator);
|
||||
|
||||
return Oizys{
|
||||
.allocator = allocator,
|
||||
|
@ -127,7 +129,8 @@ pub fn run(self: *Oizys) !void {
|
|||
try self.runNixCmd(NixCmd.Nix, &.{ "build", self.output });
|
||||
},
|
||||
.output => {
|
||||
std.debug.print("{s}", .{self.output});
|
||||
const stdout = std.io.getStdOut().writer();
|
||||
try stdout.print("{s}\n", .{self.output});
|
||||
},
|
||||
.cache => {
|
||||
try self.cache();
|
||||
|
|
|
@ -18,5 +18,4 @@ pub fn main() !void {
|
|||
|
||||
var oizys = try Oizys.init(allocator, matches);
|
||||
try oizys.run();
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue