WIP: operator collaboration MVP

See toolshed/organising#467
This commit is contained in:
2024-12-30 00:46:25 +01:00
parent 74108b0dd9
commit 4d7c812fe2
13 changed files with 319 additions and 20 deletions

View File

@ -1,6 +1,8 @@
package recipe
import (
"fmt"
"coopcloud.tech/abra/cli/internal"
"coopcloud.tech/abra/pkg/autocomplete"
gitPkg "coopcloud.tech/abra/pkg/git"
@ -22,8 +24,12 @@ var RecipeDiffCommand = &cobra.Command{
},
Run: func(cmd *cobra.Command, args []string) {
r := internal.ValidateRecipe(args, cmd.Name())
if err := gitPkg.DiffUnstaged(r.Dir); err != nil {
diff, err := gitPkg.DiffUnstaged(r.Dir, "")
if err != nil {
log.Fatal(err)
}
if diff != "" {
fmt.Print(diff)
}
},
}