Revert "fix tests/integration/recipe_new.bats"
All checks were successful
continuous-integration/drone/pr Build is passing

This reverts commit 0aac464ded.
This commit is contained in:
2024-03-07 17:48:42 +01:00
parent a760280564
commit a44549117d
4 changed files with 9 additions and 31 deletions

View File

@ -238,22 +238,6 @@ var RemoteUserFlag = &cli.StringFlag{
Destination: &RemoteUser,
}
var GitUser string
var GitUserFlag = &cli.StringFlag{
Name: "git-user, gu",
Value: "",
Usage: "Git user name to do commits with",
Destination: &GitUser,
}
var GitEmail string
var GitEmailFlag = &cli.StringFlag{
Name: "git-email, ge",
Value: "",
Usage: "Git email name to do commits with",
Destination: &GitEmail,
}
// SubCommandBefore wires up pre-action machinery (e.g. --debug handling).
func SubCommandBefore(c *cli.Context) error {
if Debug {

View File

@ -4,6 +4,7 @@ import (
"bytes"
"errors"
"fmt"
"io/ioutil"
"os"
"path"
"text/template"
@ -36,8 +37,6 @@ var recipeNewCommand = cli.Command{
internal.DebugFlag,
internal.NoInputFlag,
internal.OfflineFlag,
internal.GitUserFlag,
internal.GitEmailFlag,
},
Before: internal.SubCommandBefore,
Usage: "Create a new recipe",
@ -93,14 +92,14 @@ recipe and domain in the sample environment config).
logrus.Fatal(err)
}
if err := os.WriteFile(path, templated.Bytes(), 0644); err != nil {
if err := ioutil.WriteFile(path, templated.Bytes(), 0644); err != nil {
logrus.Fatal(err)
}
}
newGitRepo := path.Join(config.RECIPES_DIR, recipeName)
if err := git.Init(newGitRepo, true, internal.GitUser, internal.GitEmail); err != nil {
if err := git.Init(newGitRepo, true); err != nil {
logrus.Fatal(err)
}