mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 14:20:44 -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",
|
Short: "poor man's nix flake check",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
oizys.CheckFlake(flake)
|
oizys.CheckFlake(flake)
|
||||||
oizys.NixDryRun(oizys.Output(flake, host))
|
oizys.NixDryRun(flake, host)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,8 @@ func ParseDryRunOutput(nixOutput string) {
|
||||||
ShowTable(columns, rows)
|
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")
|
cmd := exec.Command("nix", "build", path, "--dry-run")
|
||||||
s := spinner.New(
|
s := spinner.New(
|
||||||
spinner.CharSets[14],
|
spinner.CharSets[14],
|
||||||
|
@ -77,6 +78,7 @@ func NixDryRun(path string) {
|
||||||
output, err := cmd.CombinedOutput()
|
output, err := cmd.CombinedOutput()
|
||||||
s.Stop()
|
s.Stop()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
fmt.Println(string(output))
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
ParseDryRunOutput(string(output))
|
ParseDryRunOutput(string(output))
|
||||||
|
|
Loading…
Reference in a new issue