mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 14:20:44 -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 {
|
pub fn init(allocator: std.mem.Allocator, matches: *const ArgMatches) !Oizys {
|
||||||
const cmd = matches.subcommand.?.name;
|
const cmd = matches.subcommand.?.name;
|
||||||
const flags = matches.subcommandMatches(cmd).?;
|
const flags = matches.subcommandMatches(cmd).?;
|
||||||
const host = flags.getSingleValue("host") orelse try Oizys.getDefaultHostName(allocator);
|
const host = flags.getSingleValue("host") orelse
|
||||||
const flake = flags.getSingleValue("flake") orelse try Oizys.getDefaultFlake(allocator);
|
try Oizys.getDefaultHostName(allocator);
|
||||||
|
const flake = flags.getSingleValue("flake") orelse
|
||||||
|
try Oizys.getDefaultFlake(allocator);
|
||||||
|
|
||||||
return Oizys{
|
return Oizys{
|
||||||
.allocator = allocator,
|
.allocator = allocator,
|
||||||
|
@ -127,7 +129,8 @@ pub fn run(self: *Oizys) !void {
|
||||||
try self.runNixCmd(NixCmd.Nix, &.{ "build", self.output });
|
try self.runNixCmd(NixCmd.Nix, &.{ "build", self.output });
|
||||||
},
|
},
|
||||||
.output => {
|
.output => {
|
||||||
std.debug.print("{s}", .{self.output});
|
const stdout = std.io.getStdOut().writer();
|
||||||
|
try stdout.print("{s}\n", .{self.output});
|
||||||
},
|
},
|
||||||
.cache => {
|
.cache => {
|
||||||
try self.cache();
|
try self.cache();
|
||||||
|
|
|
@ -18,5 +18,4 @@ pub fn main() !void {
|
||||||
|
|
||||||
var oizys = try Oizys.init(allocator, matches);
|
var oizys = try Oizys.init(allocator, matches);
|
||||||
try oizys.run();
|
try oizys.run();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue