mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-05 06:03:15 -06:00
don't lose error info on oizys dry
This commit is contained in:
parent
bb87af5136
commit
86bc2bf44f
2 changed files with 4 additions and 2 deletions
|
@ -11,7 +11,7 @@ var dryCmd = &cobra.Command{
|
|||
Short: "poor man's nix flake check",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
oizys.CheckFlake(flake)
|
||||
oizys.NixDryRun(oizys.Output(flake, host))
|
||||
oizys.NixDryRun(flake, host)
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,8 @@ func ParseDryRunOutput(nixOutput string) {
|
|||
ShowTable(columns, rows)
|
||||
}
|
||||
|
||||
func NixDryRun(path string) {
|
||||
func NixDryRun(flake string, host string) {
|
||||
path := Output(flake, host)
|
||||
cmd := exec.Command("nix", "build", path, "--dry-run")
|
||||
s := spinner.New(
|
||||
spinner.CharSets[14],
|
||||
|
@ -77,6 +78,7 @@ func NixDryRun(path string) {
|
|||
output, err := cmd.CombinedOutput()
|
||||
s.Stop()
|
||||
if err != nil {
|
||||
fmt.Println(string(output))
|
||||
log.Fatal(err)
|
||||
}
|
||||
ParseDryRunOutput(string(output))
|
||||
|
|
Loading…
Reference in a new issue